class BoundField:
Method | __bool__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __str__ |
Render this field as an HTML widget. |
Method | _has_changed |
Undocumented |
Method | as_hidden |
Return a string of HTML for representing this as an <input type="hidden">. |
Method | as_text |
Return a string of HTML for representing this as an <input type="text">. |
Method | as_textarea |
Return a string of HTML for representing this as a <textarea>. |
Method | as_widget |
Render the field by rendering the passed widget, adding any HTML attributes passed as attrs. If a widget isn't specified, use the field's default widget. |
Method | build_widget_attrs |
Undocumented |
Method | css_classes |
Return a string of space-separated CSS classes for this field. |
Method | label_tag |
Wrap the given contents in a <label>, if the field has an ID attribute. contents should be mark_safe'd to avoid HTML escaping. If contents aren't given, use the field's HTML-escaped label. |
Method | value |
Return the value for this BoundField, using the initial value if the form is not bound or the data otherwise. |
Instance Variable | field |
Undocumented |
Instance Variable | form |
Undocumented |
Instance Variable | help_text |
Undocumented |
Instance Variable | html_initial_id |
Undocumented |
Instance Variable | html_initial_name |
Undocumented |
Instance Variable | html_name |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | name |
Undocumented |
Property | auto_id |
Calculate and return the ID attribute for this BoundField, if the associated Form has specified auto_id. Return an empty string otherwise. |
Property | data |
Return the data for this BoundField, or None if it wasn't given. |
Property | errors |
Return an ErrorList (empty if there are no errors) for this field. |
Property | id_for_label |
Wrapper around the field widget's id_for_label method. Useful, for example, for focusing on this field regardless of whether it has a single widget or a MultiWidget. |
Property | initial |
Undocumented |
Property | is_hidden |
Return True if this BoundField's widget is hidden. |
Property | subwidgets |
Most widgets yield a single subwidget, but others like RadioSelect and CheckboxSelectMultiple produce one subwidget for each choice. |
Property | widget_type |
Undocumented |
Wrap the given contents in a <label>, if the field has an ID attribute. contents should be mark_safe'd to avoid HTML escaping. If contents aren't given, use the field's HTML-escaped label.
If attrs are given, use them as HTML attributes on the <label> tag.
label_suffix overrides the form's label_suffix.
id_for_label
method.
Useful, for example, for focusing on this field regardless of whether
it has a single widget or a MultiWidget.