Ticket #16434: widget_docs_extras.patch
File widget_docs_extras.patch, 1.2 KB (added by , 13 years ago) |
---|
-
docs/ref/forms/widgets.txt
42 42 Many widgets have optional extra arguments; they can be set when defining the 43 43 widget on the field. In the following example, the 44 44 :attr:`~SelectDateWidget.years` attribute is set for a 45 :class:`~django.forms. widgets.extras.SelectDateWidget`:45 :class:`~django.forms.extras.widgets.SelectDateWidget`: 46 46 47 47 .. code-block:: python 48 48 49 49 from django.forms.fields import DateField, ChoiceField, MultipleChoiceField 50 50 from django.forms.widgets import RadioSelect, CheckboxSelectMultiple 51 from django.forms. widgets.extras import SelectDateWidget51 from django.forms.extras.widgets import SelectDateWidget 52 52 53 53 BIRTH_YEAR_CHOICES = ('1980', '1981', '1982') 54 54 GENDER_CHOICES = (('m', 'Male'), ('f', 'Female')) … … 402 402 Similar to :class:`SplitDateTimeWidget`, but uses :class:`HiddenInput` for 403 403 both date and time. 404 404 405 .. currentmodule:: django.forms. widgets.extras405 .. currentmodule:: django.forms.extras.widgets 406 406 407 407 .. class:: SelectDateWidget 408 408