#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:  closed
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:  fixed
     Keywords:  ModelForm        |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"8641489f4dffdeff0897d7d715d02a50ff0b23cf" 8641489]:
 {{{
 #!CommitTicketReference repository=""
 revision="8641489f4dffdeff0897d7d715d02a50ff0b23cf"
 [1.11.x] Fixed #28345 -- Applied limit_choices_to during
 ModelForm.__init__().

 field_for_model() now has an additional keyword argument,
 apply_limit_choices_to, allowing it to continue to be used to create
 form fields dynamically after ModelForm.__init__() is called.

 Thanks Tim Graham for the review.

 Backport of a1be12fe193c8f3de8a0b0820f460a302472375f from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28345#comment:6>
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.1c1996c1ca6def1fdca2f59d8bbe1f68%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to