mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #22537 -- Add tests and improved docs for field subclass with choices.
This commit is contained in:
parent
8ec388a69d
commit
7fd1b35ed7
4 changed files with 30 additions and 5 deletions
|
@ -83,8 +83,8 @@ 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::
|
||||
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::
|
||||
|
||||
YEAR_IN_SCHOOL_CHOICES = (
|
||||
('FR', 'Freshman'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue