diff options
| author | Gabriel Hurley <gabehr@gmail.com> | 2011-08-18 22:39:20 +0000 |
|---|---|---|
| committer | Gabriel Hurley <gabehr@gmail.com> | 2011-08-18 22:39:20 +0000 |
| commit | 40c8a603c3bd8ab85af5b66f4e149fe614e86eca (patch) | |
| tree | 1cf03075dc5ae7faf09c8f36731eda3d0471fe9c /docs/ref/forms | |
| parent | 41b31b4d09c238d723e951dc0233bae747cfb8e9 (diff) | |
Fixed #16591 -- Fixed some mismatched variable names in a widgets reference example. Thanks to santi.romero, el barto, and julien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/forms')
| -rw-r--r-- | docs/ref/forms/widgets.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index e4099ccaf2..4b96a1024e 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -52,15 +52,15 @@ widget on the field. In the following example, the BIRTH_YEAR_CHOICES = ('1980', '1981', '1982') GENDER_CHOICES = (('m', 'Male'), ('f', 'Female')) - FAVOURITE_COLORS_CHOICES = (('blue', 'Blue'), + FAVORITE_COLORS_CHOICES = (('blue', 'Blue'), ('green', 'Green'), ('black', 'Black')) class SimpleForm(forms.Form): - birth_year = DateField(widget=SelectDateWidget(years=YEAR_CHOICES)) - gender = ChoiceField(widget=RadioSelect, choices=RADIO_CHOICES) - favourite_colors = forms.MultipleChoiceField(required=False, - widget=CheckboxSelectMultiple, choices=CHECKBOX_CHOICES) + birth_year = DateField(widget=SelectDateWidget(years=BIRTH_YEAR_CHOICES)) + gender = ChoiceField(widget=RadioSelect, choices=GENDER_CHOICES) + favorite_colors = forms.MultipleChoiceField(required=False, + widget=CheckboxSelectMultiple, choices=FAVORITE_COLORS_CHOICES) See the :ref:`built-in widgets` for more information about which widgets are available and which arguments they accept. |
