Fixed #22537 -- Add tests and improved docs for field subclass with choices.

This commit is contained in:
Mike Fogel 2014-04-11 23:58:56 -04:00 committed by Tim Graham
parent 8ec388a69d
commit 7fd1b35ed7
4 changed files with 30 additions and 5 deletions

View file

@ -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'),