Code

Opened 8 years ago

Closed 8 years ago

#2193 closed enhancement (duplicate)

implement dynamic limit_choices_to

Reported by: anonymous Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

One should be able to supply limit_choices_to with a callable. Ideally this callable should get the model instance as a parameter.

This would allow a powerful filtering depending on arbitrary conditions which would also be usable in the admin interface.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by anonymous

  • Type changed from defect to enhancement

comment:2 Changed 8 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #2445, which has a patch.

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.