#2445: [patch] allow callable values for limit_choices_to
-----------------------------------+----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Core framework | Version:
Severity: normal | Keywords:
-----------------------------------+----------------------------------------
Allow '''limit_choices_to''' to test for and invoke callable value
arguments. This would allow filtering on dynamically determined values.
It enhances the possibilities for customising the admin interface. This
may be related to Ticket 2193 (sounds similar at any rate).
For example:
{{{
def assigned_tasks():
return get_assigned_tasks_id_list(blah, blah)
class TimeRecord(models.Model):
task = models.ForeignKey(Task, limit_choices_to = {'id__in':
assigned_tasks})
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/2445>
Django <http://code.djangoproject.org/>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---