class documentation

class SelectDateWidget(Widget): (source)

View In Hierarchy

A widget that splits date input into three <select> boxes. This also serves as an example of a Widget that has more than one HTML element and hence implements value_from_datadict.

Method __init__ Undocumented
Method format_value Return a dict containing the year, month, and day of the current value. Use dict instead of a datetime to allow invalid dates such as February 31 to display correctly.
Method get_context Undocumented
Method id_for_label Return the HTML ID attribute of this Widget for use by a <label>, given the ID of the field. Return an empty string if no ID is available.
Method value_from_datadict Given a dictionary of data and this widget's name, return the value of this widget or None if it's not provided.
Method value_omitted_from_data Undocumented
Class Variable date_re Undocumented
Class Variable day_field Undocumented
Class Variable input_type Undocumented
Class Variable month_field Undocumented
Class Variable none_value Undocumented
Class Variable template_name Undocumented
Class Variable use_fieldset Undocumented
Class Variable year_field Undocumented
Instance Variable attrs Undocumented
Instance Variable day_none_value Undocumented
Instance Variable month_none_value Undocumented
Instance Variable months Undocumented
Instance Variable year_none_value Undocumented
Instance Variable years Undocumented
Static Method _parse_date_fmt Undocumented

Inherited from Widget:

Method __deepcopy__ Undocumented
Method build_attrs Build an attribute dictionary.
Method render Render the widget as an HTML string.
Method subwidgets Undocumented
Method use_required_attribute Undocumented
Class Variable is_localized Undocumented
Class Variable is_required Undocumented
Class Variable needs_multipart_form Undocumented
Class Variable supports_microseconds Undocumented
Property is_hidden Undocumented
Method _render Undocumented
def __init__(self, attrs=None, years=None, months=None, empty_label=None): (source)

Undocumented

def format_value(self, value): (source)

Return a dict containing the year, month, and day of the current value. Use dict instead of a datetime to allow invalid dates such as February 31 to display correctly.

def get_context(self, name, value, attrs): (source)
def id_for_label(self, id_): (source)

Return the HTML ID attribute of this Widget for use by a <label>, given the ID of the field. Return an empty string if no ID is available. This hook is necessary because some widgets have multiple HTML elements and, thus, multiple IDs. In that case, this method should return an ID value that corresponds to the first ID in the widget's tags.

def value_from_datadict(self, data, files, name): (source)

Given a dictionary of data and this widget's name, return the value of this widget or None if it's not provided.

def value_omitted_from_data(self, data, files, name): (source)

Undocumented

day_field: str = (source)

Undocumented

input_type: str = (source)

Undocumented

month_field: str = (source)

Undocumented

none_value: tuple[str, ...] = (source)

Undocumented

template_name: str = (source)

Undocumented

year_field: str = (source)

Undocumented

day_none_value = (source)

Undocumented

month_none_value = (source)

Undocumented

Undocumented

year_none_value = (source)

Undocumented

Undocumented

@staticmethod
def _parse_date_fmt(): (source)

Undocumented