forms.SplitDateTimeWidget

class SplitDateTimeWidget [source] Wrapper (using MultiWidget) around two widgets: DateInput for the date, and TimeInput for the time. Must be used with SplitDateTimeField rather than DateTimeField. SplitDateTimeWidget has two optional attributes: date_format Similar to DateInput.format time_format Similar to TimeInput.format

forms.SplitDateTimeField.input_time_formats

input_time_formats A list of formats used to attempt to convert a string to a valid datetime.time object. If no input_time_formats argument is provided, the default input formats for TimeField are used.

forms.SplitDateTimeField.input_date_formats

input_date_formats A list of formats used to attempt to convert a string to a valid datetime.date object. If no input_date_formats argument is provided, the default input formats for DateField are used.

forms.SplitDateTimeField

class SplitDateTimeField(**kwargs) [source] Default widget: SplitDateTimeWidget Empty value: None Normalizes to: A Python datetime.datetime object. Validates that the given value is a datetime.datetime or string formatted in a particular datetime format. Error message keys: required, invalid, invalid_date, invalid_time Takes two optional arguments: input_date_formats A list of formats used to attempt to convert a string to a valid datetime.date object. If no input_date_formats arg

forms.SlugField.allow_unicode

allow_unicode New in Django 1.9. A boolean instructing the field to accept Unicode letters in addition to ASCII letters. Defaults to False.

forms.SlugField

class SlugField(**kwargs) [source] Default widget: TextInput Empty value: '' (an empty string) Normalizes to: A Unicode object. Validates that the given value contains only letters, numbers, underscores, and hyphens. Error messages: required, invalid This field is intended for use in representing a model SlugField in forms. Takes an optional parameter: allow_unicode New in Django 1.9. A boolean instructing the field to accept Unicode letters in addition to ASCII letters. Defaults to

forms.SelectMultiple

class SelectMultiple [source] Similar to Select, but allows multiple selection: <select multiple='multiple'>...</select>

forms.SelectDateWidget.years

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.

forms.SelectDateWidget.months

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:_('feb'), 3:_('mar'), 4:_('apr'), 5:_('may'), 6:_('jun'), 7:_('jul'), 8:_('aug'), 9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec') }

forms.SelectDateWidget.empty_label

empty_label If the DateField is not required, SelectDateWidget will have an empty choice at the top of the list (which is --- by default). You can change the text of this label with the empty_label attribute. empty_label can be a string, list, or tuple. When a string is used, all select boxes will each have an empty choice with this label. If empty_label is a list or tuple of 3 string elements, the select boxes will have their own custom label. The labels should be in this order ('year_label