mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #32110 -- Doc'd and tested enumerations for ChoiceField.choices.
This commit is contained in:
parent
af87574a3c
commit
7f85498eef
2 changed files with 19 additions and 6 deletions
|
@ -410,12 +410,13 @@ 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, 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
|
||||
<field-choices>` for more details. If the argument is a callable, it is
|
||||
evaluated each time the field's form is initialized, in addition to
|
||||
during rendering. Defaults to an empty list.
|
||||
field, :ref:`enumeration <field-choices-enum-types>` choices, 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 <field-choices>`
|
||||
for more details. If the argument is a callable, it is evaluated each
|
||||
time the field's form is initialized, in addition to during rendering.
|
||||
Defaults to an empty list.
|
||||
|
||||
``TypedChoiceField``
|
||||
--------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue