forms.SelectDateWidget

class SelectDateWidget [source] Wrapper around three Select widgets: one each for month, day, and year. Takes several optional arguments: years An optional list/tuple of years to use in the “year” select box. The default is a list containing the current year and the next 9 years. months An optional dict of months to use in the “months” select box. The keys of the dict correspond to the month number (1-indexed) and the values are the displayed months: MONTHS = { 1:_('jan'), 2:_('

forms.Select.choices

choices This attribute is optional when the form field does not have a choices attribute. If it does, it will override anything you set here when the attribute is updated on the Field.

forms.Select

class Select [source] Select widget: <select><option ...>...</select> choices This attribute is optional when the form field does not have a choices attribute. If it does, it will override anything you set here when the attribute is updated on the Field.

forms.RegexField.strip

strip New in Django 1.9. Defaults to False. If enabled, stripping will be applied before the regex validation.

forms.RegexField.regex

regex A regular expression specified either as a string or a compiled regular expression object. Also takes max_length, min_length, and strip, which work just as they do for CharField.

forms.RegexField

class RegexField(**kwargs) [source] Default widget: TextInput Empty value: '' (an empty string) Normalizes to: A Unicode object. Validates that the given value matches against a certain regular expression. Error message keys: required, invalid Takes one required argument: regex A regular expression specified either as a string or a compiled regular expression object. Also takes max_length, min_length, and strip, which work just as they do for CharField. strip New in Django 1.9.

forms.RadioSelect

class RadioSelect [source] Similar to Select, but rendered as a list of radio buttons within <li> tags: <ul> <li><input type='radio' name='...'></li> ... </ul> For more granular control over the generated markup, you can loop over the radio buttons in the template. Assuming a form myform with a field beatles that uses a RadioSelect as its widget: {% for radio in myform.beatles %} <div class="myradio"> {{ radio }} </div> {% endfor %} T

forms.PasswordInput.render_value

render_value Determines whether the widget will have a value filled in when the form is re-displayed after a validation error (default is False).

forms.PasswordInput

class PasswordInput [source] Password input: <input type='password' ...> Takes one optional argument: render_value Determines whether the widget will have a value filled in when the form is re-displayed after a validation error (default is False).

forms.NumberInput

class NumberInput [source] Text input: <input type="number" ...> Beware that not all browsers support entering localized numbers in number input types. Django itself avoids using them for fields having their localize property set to True.