Fixed #21397 -- Re-added flexibility to TypedChoiceField coercion

Thanks Elec for the report and Simon Charette for the review.
This commit is contained in:
Claude Paroz 2013-11-18 18:24:56 +01:00
parent 4a00f132e0
commit a0f3eeccf3
4 changed files with 51 additions and 7 deletions

View file

@ -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