#15960: Allow SimpleListerFilter's lookups to be based on the available data -----------------------------+----------------------------------------- Reporter: julien | Owner: nobody Type: New feature | Status: new Milestone: | Component: contrib.admin Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | -----------------------------+----------------------------------------- Shortly after `SimpleListFilter` landed in [16144], there were talks on IRC with jezdez, carljm and apollo13 about allowing filter lookups to be based on the available data. Taking the `DecadeBornListFilter ` example from the doc (http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter), you might want to only display the lookups for the decades where people were actually born in. This requires the `lookups()` method to have access to the `ModelAdmin`'s queryset, somehow.
I'm attaching a patch with a suggested implementation. -- Ticket URL: <http://code.djangoproject.com/ticket/15960> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.