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 |
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 |
Undocumented |
Method | id |
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 |
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 |
Undocumented |
Class Variable | date |
Undocumented |
Class Variable | day |
Undocumented |
Class Variable | input |
Undocumented |
Class Variable | month |
Undocumented |
Class Variable | none |
Undocumented |
Class Variable | template |
Undocumented |
Class Variable | use |
Undocumented |
Class Variable | year |
Undocumented |
Instance Variable | attrs |
Undocumented |
Instance Variable | day |
Undocumented |
Instance Variable | month |
Undocumented |
Instance Variable | months |
Undocumented |
Instance Variable | year |
Undocumented |
Instance Variable | years |
Undocumented |
Static Method | _parse |
Undocumented |
Inherited from Widget
:
Method | __deepcopy__ |
Undocumented |
Method | build |
Build an attribute dictionary. |
Method | render |
Render the widget as an HTML string. |
Method | subwidgets |
Undocumented |
Method | use |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | needs |
Undocumented |
Class Variable | supports |
Undocumented |
Property | is |
Undocumented |
Method | _render |
Undocumented |
django.forms.widgets.Widget.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.
django.forms.widgets.Widget.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. 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.
Given a dictionary of data and this widget's name, return the value of this widget or None if it's not provided.