#11707: limit_choices_to on a ForeignKey can render duplicate options in
formfield
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
Chris.Wesseling@… | Milestone:
Status: reopened | Version: SVN
Component: Forms | Keywords: ForeingKey
Resolution: | limit_choices_to
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 1 |
-------------------------------------+-------------------------------------
Comment (by charstring):
Replying to [comment:7 lukeplant]:
> {{{
> #!CommitTicketReference repository="" revision="15791"
> Fixed #15559 - distinct queries introduced by [15607] cause errors with
some custom model fields
> }}}
Can someone point me to an example of such a custom model field or, even
better, a test showing the breakage?
Replying to [comment:8 lukeplant]:
> For future reference, a possible alternative solution might be to do
filtering of duplicates in Python, at the point of rendering the form
field, rather than in the database.
Assuming 'limit_choices_to' is only used by Forms...
--
Ticket URL: <http://code.djangoproject.com/ticket/11707#comment:11>
Django <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.