Code

Opened 7 years ago

Closed 7 years ago

#4206 closed (duplicate)

In Admin "list_filter" does not respect "limit_choices_to"

Reported by: david@… Owned by: adrian
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: UI/UX:

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'

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by jdunck

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #3096

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.