From a1be12fe193c8f3de8a0b0820f460a302472375f Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 28 Jun 2017 20:30:19 -0700 Subject: 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. --- docs/releases/1.11.3.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/releases/1.11.3.txt b/docs/releases/1.11.3.txt index 227c94abb4..79fd3edb6a 100644 --- a/docs/releases/1.11.3.txt +++ b/docs/releases/1.11.3.txt @@ -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`). -- cgit v1.3