summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorStephen Burrows <stephen.r.burrows@gmail.com>2012-10-03 19:50:12 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-10-03 20:47:35 +0300
commit218abcc9e550d266a9979e10f562fc21b8f34c6a (patch)
tree470b36198da19a8fb5ebe6978bf280ece1801b21 /docs/ref
parentd25a599dca9b7644b238f6c89a66545dfdabe393 (diff)
Fixed #14567 -- Made ModelMultipleChoiceField return EmptyQuerySet as empty value
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/forms/fields.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 82a3ea9ab3..27ca002312 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -997,13 +997,17 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
.. class:: ModelMultipleChoiceField(**kwargs)
* Default widget: ``SelectMultiple``
- * Empty value: ``[]`` (an empty list)
- * Normalizes to: A list of model instances.
+ * Empty value: An empty ``QuerySet`` (self.queryset.none())
+ * Normalizes to: A ``QuerySet`` of model instances.
* Validates that every id in the given list of values exists in the
queryset.
* Error message keys: ``required``, ``list``, ``invalid_choice``,
``invalid_pk_value``
+ .. versionchanged:: 1.5
+ The empty and normalized values were changed to be consistently
+ ``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
+
Allows the selection of one or more model objects, suitable for
representing a many-to-many relation. As with :class:`ModelChoiceField`,
you can use ``label_from_instance`` to customize the object