Opened 18 years ago
Closed 17 years ago
#4206 closed (duplicate)
In Admin "list_filter" does not respect "limit_choices_to"
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
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 |
Description
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'
Note:
See TracTickets
for help on using tickets.
This is a duplicate of #3096