On Tue, Mar 13, 2012 at 10:41 AM, Phanounou <[email protected]> wrote:
> When I look at the traceback from the django_debug_toolbar, there is 1852
> queries in 20956ms, there is several repetition of the same calls. And there
> is a lot of unnacessary calls. How can I optimise that? what can I do about
> it? is there a way to overwrite the page for a given object. Because I
> realise that my custom pages take less time to load.

in a similar situation, i found that defining the
formfield_for_foreignkey() method lets you optimize the queryset used
for the selection widgets.

check the admin docs, there are lots of tuning there.  specifically

https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_foreignkey

and many more.

-- 
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to