forms.TypedChoiceField

class TypedChoiceField(**kwargs) [source] Just like a ChoiceField, except TypedChoiceField takes two extra arguments, coerce and empty_value. Default widget: Select Empty value: Whatever you’ve given as empty_value. Normalizes to: A value of the type provided by the coerce argument. Validates that the given value exists in the list of choices and can be coerced. Error message keys: required, invalid_choice Takes extra arguments: coerce A function that takes one argument and returns a

forms.TimeInput.format

format The format in which this field’s initial value will be displayed. If no format argument is provided, the default format is the first format found in TIME_INPUT_FORMATS and respects Format localization. For the treatment of microseconds, see DateTimeInput.

forms.TimeInput

class TimeInput [source] Time input as a simple text box: <input type='text' ...> Takes same arguments as TextInput, with one more optional argument: format The format in which this field’s initial value will be displayed. If no format argument is provided, the default format is the first format found in TIME_INPUT_FORMATS and respects Format localization. For the treatment of microseconds, see DateTimeInput.

forms.TimeField.input_formats

input_formats A list of formats used to attempt to convert a string to a valid datetime.time object. If no input_formats argument is provided, the default input formats are: '%H:%M:%S', # '14:30:59' '%H:%M', # '14:30'

forms.TimeField

class TimeField(**kwargs) [source] Default widget: TextInput Empty value: None Normalizes to: A Python datetime.time object. Validates that the given value is either a datetime.time or string formatted in a particular time format. Error message keys: required, invalid Takes one optional argument: input_formats A list of formats used to attempt to convert a string to a valid datetime.time object. If no input_formats argument is provided, the default input formats are: '%H:%M:%S',

forms.TextInput

class TextInput [source] Text input: <input type="text" ...>

forms.Textarea

class Textarea [source] Text area: <textarea>...</textarea>

forms.SplitHiddenDateTimeWidget

class SplitHiddenDateTimeWidget [source] Similar to SplitDateTimeWidget, but uses HiddenInput for both date and time.

forms.SplitDateTimeWidget.time_format

time_format Similar to TimeInput.format

forms.SplitDateTimeWidget.date_format

date_format Similar to DateInput.format