diff options
| author | Tim Graham <timograham@gmail.com> | 2018-07-09 15:06:36 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-07-09 15:06:56 -0400 |
| commit | 50dc9fad74b4992602584252207f38c5faecc2ba (patch) | |
| tree | b1fed068e9ffe4375884cca6bbf553e6461b5df7 | |
| parent | 2a637a45232fa5f046034958a6df91804bbab32c (diff) | |
[2.1.x] Fixed #29549 -- Doc'd that Field.choices are enforced by model validation.
Backport of 8b1d361f28c80cb0fa84a3714d711174bd25cdfa from master
| -rw-r--r-- | docs/ref/models/fields.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 5fc785fb18..210619881c 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -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 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 -instead of the standard text field. +choices are given, they're enforced by :ref:`model validation +<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, and the second element is the human-readable name. For example:: |
