Wednesday, January 25, 2012

Re: admin list_filter: limit choices to model values?

On Fri, Jan 13, 2012 at 3:35 PM, Micky Hulse <rgmicky@gmail.com> wrote:
> Would it be possible for me to setup my list_filter to only show
> author names that have been assigned to my flat pages? For example,
> let's say I have 10 pages, and two of those pages have the been FK'd
> to "bjohnson" and "fjackson"... In my list_filter view, I would like
> to only see "bjohnson" and "fjackson".

Just as an update, I found this:

<https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter>

... and it looks like what I need... Unfortunately, it's new in trunk
(I'm on 1.3).

I am hoping there's something similar to SimpleListFilter in 1.3.

I'm now trying to figure out how to browse Django source for version 1.3. :)

I will post back with more info if I figure something out.

Thanks!
Micky

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment