Saturday, November 14, 2015

Re: Time out when requesting element from Admin

I don't know about the rest part, but for admin I'd try to use raw_id_fields, that doesn't fetch the whole Unicode/str representation for all elements the foreign key could point to. Do you have some complex code in __unicode__ or __str__?

Raw Id documentation:
ModelAdmin.raw_id_fields

By default, Django's admin uses a select-box interface (<select>) for fields that are ForeignKey. Sometimes you don't want to incur the overhead of having to select all the related instances to display in the drop-down.

raw_id_fields is a list of fields you would like to change into an Input widget for either a ForeignKey orManyToManyField:


Best regards
Joseph




Von meinem iPhone gesendet
Am 14.11.2015 um 08:14 schrieb Joakim Hove <joakim.hove@gmail.com>:

knees?

No comments:

Post a Comment