1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields.

This commit is contained in:
T. Franzel
2023-03-11 00:34:13 +01:00
committed by Mariusz Felisiak
parent 051d5944f8
commit a2eaea8f22
12 changed files with 48 additions and 19 deletions

View File

@@ -167,7 +167,9 @@ File Uploads
Forms
~~~~~
* ...
* :attr:`.ChoiceField.choices` now accepts
:ref:`Choices classes <field-choices-enum-types>` directly instead of
requiring expansion with the ``choices`` attribute.
Generic Views
~~~~~~~~~~~~~
@@ -208,6 +210,10 @@ Models
of ``ValidationError`` raised during
:ref:`model validation <validating-objects>`.
* :attr:`.Field.choices` now accepts
:ref:`Choices classes <field-choices-enum-types>` directly instead of
requiring expansion with the ``choices`` attribute.
Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~