diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index e45776f4f2e21..d0b7b1612fec5 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -133,10 +133,11 @@ More options for declaring field choices ---------------------------------------- :attr:`.Field.choices` *(for model fields)* and :attr:`.ChoiceField.choices` -*(for form fields)* use a list of 2-tuples as the canonical form for declaring -choices values. :ref:`field-choices-enum-types`, introduced in Django 3.0, -required use of the ``.choices`` attribute to provide the choices in the -expected form:: +*(for form fields)* allow for more flexibility when declaring their values. In +previous versions of Django, ``choices`` should either be a list of 2-tuples, +or an :ref:`field-choices-enum-types` subclass, but the latter required +accessing the ``.choices`` attribute to provide the values in the expected +form:: from django.db import models @@ -154,9 +155,9 @@ expected form:: medal = models.CharField(..., choices=Medal.choices) sport = models.CharField(..., choices=SPORT_CHOICES) -Django 5.0 allows providing a mapping instead of an iterable and also no longer -requires ``.choices`` to be used directly to expand :ref:`enumeration types -` into canonical form:: +Django 5.0 supports providing a mapping instead of an iterable, and also no +longer requires ``.choices`` to be used directly to expand :ref:`enumeration +types `:: from django.db import models @@ -174,8 +175,8 @@ requires ``.choices`` to be used directly to expand :ref:`enumeration types medal = models.CharField(..., choices=Medal) # Using `.choices` not required. sport = models.CharField(..., choices=SPORT_CHOICES) -Under the hood the provided choices are normalized into the canonical form -whenever the ``choices`` value is updated. +Under the hood the provided ``choices`` are normalized into a list of 2-tuples +as the canonical form whenever the ``choices`` value is updated. Minor features --------------