From 63c56cda133a85a158502891c40465bc0331d3d9 Mon Sep 17 00:00:00 2001 From: Annabelle Wiegart Date: Sun, 18 Jan 2026 20:03:28 +0100 Subject: Fixed #35870 -- Made blank choice label in forms more accessible. Added new constant django.db.models.fields.BLANK_CHOICE_LABEL for an accessible and translatable blank choice label in forms. Deprecated django.db.models.fields.BLANK_CHOICE_DASH constant. Added the immediately deprecated transitional setting USE_BLANK_CHOICE_DASH. Co-Authored-By: Marijke Luttekes --- docs/ref/models/fields.txt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'docs/ref/models') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 1cf521d621..4405d91daf 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -224,11 +224,16 @@ documentation. .. _field-choices-blank-label: Unless :attr:`blank=False` is set on the field along with a -:attr:`~Field.default` then a label containing ``"---------"`` will be rendered -with the select box. To override this behavior, add a tuple to ``choices`` -containing ``None``; e.g. ``(None, 'Your String For Display')``. -Alternatively, you can use an empty string instead of ``None`` where this makes -sense - such as on a :class:`~django.db.models.CharField`. +:attr:`~Field.default` then a label containing ``"- Select an option -"`` will +be rendered with the select box. To override this behavior, add a tuple to +``choices`` containing ``None``; e.g. ``(None, 'Your String For Display')``. +Alternatively, you can use an empty string instead of ``None`` where this +makes sense - such as on a :class:`~django.db.models.CharField`. + +.. versionchanged:: 6.1 + + The default blank label was changed from ``"---------"`` to + ``"- Select an option -"``. .. _field-choices-enum-types: -- cgit v1.3