class documentation

class RelatedFieldWidgetWrapper(forms.Widget): (source)

View In Hierarchy

This class is a wrapper to a given widget to add the add icon for the admin interface.

Method __deepcopy__ Undocumented
Method __init__ Undocumented
Method get_context Undocumented
Method get_related_url 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 template_name Undocumented
Instance Variable admin_site Undocumented
Instance Variable attrs Undocumented
Instance Variable can_add_related Undocumented
Instance Variable can_change_related Undocumented
Instance Variable can_delete_related Undocumented
Instance Variable can_view_related Undocumented
Instance Variable choices Undocumented
Instance Variable needs_multipart_form Undocumented
Instance Variable rel Undocumented
Instance Variable widget Undocumented
Property is_hidden Undocumented
Property media Undocumented

Inherited from Widget:

Method build_attrs Build an attribute dictionary.
Method format_value Return a value as it should appear when rendered in a template.
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 supports_microseconds Undocumented
Class Variable use_fieldset Undocumented
Method _render Undocumented
def __deepcopy__(self, memo): (source)
def __init__(self, widget, rel, admin_site, can_add_related=None, can_change_related=False, can_delete_related=False, can_view_related=False): (source)

Undocumented

def get_context(self, name, value, attrs): (source)
def get_related_url(self, info, action, *args): (source)

Undocumented

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)
template_name: str = (source)

Undocumented

admin_site = (source)

Undocumented

can_add_related = (source)

Undocumented

can_change_related = (source)

Undocumented

can_delete_related = (source)

Undocumented

can_view_related = (source)

Undocumented

Undocumented

needs_multipart_form = (source)

Undocumented

Undocumented

Undocumented