Opened 11 years ago

Closed 11 years ago

#4206 closed (duplicate)

In Admin "list_filter" does not respect "limit_choices_to"

Reported by: david@… Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If a list filter is defined as

    list_filter = ('nl_group')

And the 'nl_group' field is defined as

  nl_group = models.ForeignKey('self', limit_choices_to = {'o1type__exact': 'NL'}, null=True, blank=True)

Then the list filter will show ALL distinct values of 'self' rather than the distinct values in 'self' that have oltype='NL'

Change History (1)

comment:1 Changed 11 years ago by Jeremy Dunck

Resolution: duplicate
Status: newclosed

This is a duplicate of #3096

Note: See TracTickets for help on using tickets.
Back to Top