Unverified Kaydet (Commit) 8b1d361f authored tarafından Tim Graham's avatar Tim Graham Kaydeden (comit) GitHub

Fixed #29549 -- Doc'd that Field.choices are enforced by model validation.

üst 45c035c8
...@@ -82,8 +82,9 @@ If a field has ``blank=False``, the field will be required. ...@@ -82,8 +82,9 @@ If a field has ``blank=False``, the field will be required.
An iterable (e.g., a list or tuple) consisting itself of iterables of exactly An iterable (e.g., a list or tuple) consisting itself of iterables of exactly
two items (e.g. ``[(A, B), (A, B) ...]``) to use as choices for this field. If two items (e.g. ``[(A, B), (A, B) ...]``) to use as choices for this field. If
this is given, the default form widget will be a select box with these choices choices are given, they're enforced by :ref:`model validation
instead of the standard text field. <validating-objects>` and the default form widget will be a select box with
these choices instead of the standard text field.
The first element in each tuple is the actual value to be set on the model, The first element in each tuple is the actual value to be set on the model,
and the second element is the human-readable name. For example:: and the second element is the human-readable name. For example::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment