hrmm, I found this too..
http://blog.dougalmatthews.com/2008/10/filter-the-django-modeladmin-set/

the method used is def queryset(self, request): in the model admin
class...
This method is not in the docs, though.

Should any of these methods be preferred over the others?
any advice is appreciated :-)

On Jul 19, 12:17 pm, Some Guy <djul...@gmail.com> wrote:
> I was wondering if it's possible to have an admin page always show a
> filtered (or other non-default) queryset?
>
> i.e. I would like the default admin page to show a queryset without
> any rows that have a particular boolean field set to false.
>
> I've looked in the admin views.py, but haven't found anything that
> looks possible.
>
> I just need to know if it's possible, and where to look...
>
> TIA
>
> (longer version follows)
> I have a Model that I would like to display with two different
> list_displays, based on whether a boolean is true or false.
>
> I've noticed that any model inherited with no additional fields
> specified shows up in the parent model's admin page listing.  I was
> going to exploit this to make a dummy subclass of the model superclass
> with a different list_display and register that with the adminsite.
> Not sure if there is an easy way to do this, but who knows :-> there's
> lots of django tricks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to