#2445: [patch] allow callable values for limit_choices_to
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Component: Core framework
Version: | Resolution:
Keywords: | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------------------+--------------------------------------
Changes (by Dmitri Fedortchenko <[EMAIL PROTECTED]>):
* cc: [EMAIL PROTECTED] (added)
Comment:
Is anyone still working on this?
I've been seeking this functionality so I wrote a patch that actually
implements ''jkocherhans'''s way of dealing with this.
By defining a function in your model called ''choices_for__FIELDNAME'' you
can limit the choices using data from the current row...
The patch also allows for using ''QuerySets'' for the ''choices''
attribute for any field...
I am still working on getting it to work with edit_inline, but it works
perfectly with normal models.
--
Ticket URL: <http://code.djangoproject.com/ticket/2445#comment:10>
Django Code <http://code.djangoproject.com/>
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?hl=en
-~----------~----~----~----~------~----~------~--~---