From eefc88feefec0c3685bfb102714530b751b4ae90 Mon Sep 17 00:00:00 2001 From: Christopher Adams Date: Sat, 1 Feb 2014 14:23:31 -0500 Subject: Fixed #2445 -- Allowed limit_choices_to attribute to be a callable. ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now be a callable that returns either a ``Q`` object or a dict. Thanks michael at actrix.gen.nz for the original suggestion. --- docs/releases/1.7.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/releases') diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index bda84e847f..3519ac5bda 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -608,6 +608,10 @@ Models * It is now possible to use ``None`` as a query value for the :lookup:`iexact` lookup. +* It is now possible to pass a callable as value for the attribute + :attr:`ForeignKey.limit_choices_to` when defining a ``ForeignKey`` or + ``ManyToManyField``. + Signals ^^^^^^^ -- cgit v1.3