From f8c43aca467b7b0c4bb0a7fa41362f90b610b8df Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 19 Jul 2023 00:12:43 +1000 Subject: [PATCH] Added reference to TypedChoiceField in ChoiceField docs. --- docs/ref/forms/fields.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 77ccc9e862..dad5f1bbb8 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -494,6 +494,12 @@ 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. + .. admonition:: Choice type + + This field normalizes choices to strings, so if choices are required in + other data types, such as integers or booleans, consider using + :class:`TypedChoiceField` instead. + .. versionchanged:: 5.0 Support for using :ref:`enumeration types `