mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[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 a1be12fe19 from master
This commit is contained in:
@@ -57,3 +57,6 @@ Bugfixes
|
||||
|
||||
* Fixed ``UnboundLocalError`` crash in ``RenameField`` with nonexistent field
|
||||
(:ticket:`28350`).
|
||||
|
||||
* Fixed a regression preventing a model field's ``limit_choices_to`` from being
|
||||
evaluated when a ``ModelForm`` is instantiated (:ticket:`28345`).
|
||||
|
||||
Reference in New Issue
Block a user