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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user