summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/forms/fields.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 8ddc5b9d79..6186f7d4e8 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -1619,12 +1619,16 @@ customize the yielded 2-tuple choices.
``ModelChoiceIterator`` has the following method:
- .. method:: __iter__()
+ .. method:: generator()
Yields 2-tuple choices, in the ``(value, label)`` format used by
:attr:`ChoiceField.choices`. The first ``value`` element is a
:class:`ModelChoiceIteratorValue` instance.
+ .. versionchanged:: 6.1
+
+ ``generator`` yields choices instead of ``__iter__``.
+
``ModelChoiceIteratorValue``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~