diff options
| author | Donald Stufft <donald@stufft.io> | 2013-05-18 11:31:16 -0400 |
|---|---|---|
| committer | Donald Stufft <donald@stufft.io> | 2013-05-18 11:31:16 -0400 |
| commit | 398841d6d3fce45b21bdfcd8385889098079f84a (patch) | |
| tree | 570b586cdb0de1871a28ccd429b7b5a765e7df23 /docs/ref | |
| parent | 78de9b19027d3aee268797ad8899ac7283024c0c (diff) | |
| parent | a19e9d80ffa10f8da43addcaa4ddd440beee8a4d (diff) | |
Merge branch 'allow-any-iterable-for-choices'
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/fields.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index da5fe9bf60..6cf235c637 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -80,9 +80,10 @@ If a field has ``blank=False``, the field will be required. .. attribute:: Field.choices -An iterable (e.g., a list or tuple) of 2-tuples 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. +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. The first element in each tuple is the actual value to be stored, and the second element is the human-readable name. For example:: |
