#28345: limit_choices_to callable is no longer applied during ModelForm
instantiation which blocks some use cases
---------------------------------+----------------------------------------
Reporter: drunkard | Owner: Jon Dufresne
Type: Bug | Status: assigned
Component: Forms | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: ModelForm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Jon Dufresne):
* status: new => assigned
* owner: nobody => Jon Dufresne
Comment:
I agree, this is a regression.
[https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to
The docs say:]
> If a callable is used for `limit_choices_to`, it will be invoked every
time a new form is instantiated.
I have a fix in mind that will restore previous, correct behavior will
also facilitating my use case motivating the original change.
--
Ticket URL: <https://code.djangoproject.com/ticket/28345#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.ea67a5b4e12369fb3b37a8f68ab56f54%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.