From a2eaea8f22305b57dff3ab13add2e2887287bb6f Mon Sep 17 00:00:00 2001 From: "T. Franzel" Date: Sat, 11 Mar 2023 00:34:13 +0100 Subject: Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields. --- docs/ref/forms/fields.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/ref/forms/fields.txt') diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 317a955a15..7d975a74d5 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -431,7 +431,7 @@ For each field, we describe the default widget used if you don't specify .. attribute:: choices Either an :term:`iterable` of 2-tuples to use as choices for this - field, :ref:`enumeration ` choices, or a + field, :ref:`enumeration type `, or a callable that returns such an iterable. This argument accepts the same formats as the ``choices`` argument to a model field. See the :ref:`model field reference documentation on choices ` @@ -439,6 +439,11 @@ For each field, we describe the default widget used if you don't specify time the field's form is initialized, in addition to during rendering. Defaults to an empty list. + .. versionchanged:: 5.0 + + Support for using :ref:`enumeration types ` + directly in the ``choices`` was added. + ``DateField`` ------------- -- cgit v1.3