Re: select_related optimization and enhancement for the django.contrib.admin

2008-11-11 Thread David Cramer
This change is here because when you say "this foreign key is in list_filter" it immediately does a select_related() (grabbing every single relation which is ridiculous). This change says "only grab the foreign keys which are used. The only addition is that list_select_related can be a boolean, or

Re: select_related optimization and enhancement for the django.contrib.admin

2008-11-11 Thread Malcolm Tredinnick
On Mon, 2008-11-10 at 17:13 -0800, David Cramer wrote: [...] > Anyways, what it does: > > * list_select_related can be a boolean, or a list. If it's a list it > says "select_related on these fields" How is that different functionality from just specifying the names of the fields in the current

select_related optimization and enhancement for the django.contrib.admin

2008-11-10 Thread David Cramer
While I've been working on composite primary keys, I also made a few tweaks to the admin app. Most of these are related to the primary key support, but one is an optimization. I would post this as a patch, or a ticket, but I want to open this up for discussion, and my django repo is so far from