1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.4.X] Replaced documentation snippets using "gender" with less sensitive examples.

Backport of [7edf231] from master.
This commit is contained in:
Jacob Kaplan-Moss
2012-06-06 11:54:26 +02:00
parent 0a8a6b92b2
commit 45d43317b7
6 changed files with 98 additions and 109 deletions

View File

@@ -47,14 +47,12 @@ widget on the field. In the following example, the
from django.forms.extras.widgets import SelectDateWidget
BIRTH_YEAR_CHOICES = ('1980', '1981', '1982')
GENDER_CHOICES = (('m', 'Male'), ('f', 'Female'))
FAVORITE_COLORS_CHOICES = (('blue', 'Blue'),
('green', 'Green'),
('black', 'Black'))
class SimpleForm(forms.Form):
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)