diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-11-18 18:24:56 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-11-18 18:24:56 +0100 |
| commit | a0f3eeccf3d5a90f9914bfe20b15df05673ea59d (patch) | |
| tree | da91c208646cdef2a8f1dd535ab5bcd07d566a52 /docs | |
| parent | 4a00f132e0cc5246f7e7bd04b6d84a9d9ea4a0c1 (diff) | |
Fixed #21397 -- Re-added flexibility to TypedChoiceField coercion
Thanks Elec for the report and Simon Charette for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/fields.txt | 4 | ||||
| -rw-r--r-- | docs/releases/1.7.txt | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 81b65d04d4..f2cd122526 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -375,7 +375,9 @@ For each field, we describe the default widget used if you don't specify A function that takes one argument and returns a coerced value. Examples include the built-in ``int``, ``float``, ``bool`` and other types. Defaults - to an identity function. + to an identity function. Note that coercion happens after input + validation, so it is possible to coerce to a value not present in + ``choices``. .. attribute:: empty_value diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 2a2fd30363..8428c1853a 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -317,6 +317,10 @@ Forms return ``self.cleaned_data``. If it does return a changed dictionary then that will still be used. +* After a temporary regression in Django 1.6, it's now possible again to make + :class:`~django.forms.TypedChoiceField` ``coerce`` method return an arbitrary + value. + * :attr:`SelectDateWidget.months <django.forms.extras.widgets.SelectDateWidget.months>` can be used to customize the wording of the months displayed in the select widget. |
