The horizon.forms.views
ModuleΒΆ
-
class
horizon.forms.views.
ModalBackdropMixin
(*args, **kwargs)[source] Bases:
object
This mixin class is to be used for together with ModalFormView and WorkflowView classes to augment them with modal_backdrop context data.
-
get_context_data
(**kwargs)[source]
-
modal_backdrop
= 'static'
-
-
class
horizon.forms.views.
ModalFormMixin
(*args, **kwargs)[source] Bases:
horizon.forms.views.ModalBackdropMixin
-
get_context_data
(**kwargs)[source]
-
get_template_names
()[source]
-
-
class
horizon.forms.views.
ModalFormView
(*args, **kwargs)[source] Bases:
horizon.forms.views.ModalFormMixin
,horizon.views.HorizonFormView
The main view class from which all views which handle forms in Horizon should inherit. It takes care of all details with processing
SelfHandlingForm
classes, and modal concerns when the associated template inherits from horizon/common/_modal_form.html.Subclasses must define a
form_class
andtemplate_name
attribute at minimum.See Django’s documentation on the FormView class for more details.
-
cancel_label
= <django.utils.functional.__proxy__ object>
-
cancel_url
= None
-
form_id
= None
-
form_invalid
(form)[source]
-
form_valid
(form)[source]
-
get_cancel_url
()[source]
-
get_context_data
(**kwargs)[source]
-
get_form
(form_class=None)[source] Returns an instance of the form to be used in this view.
-
get_object_display
(obj)[source] For dynamic insertion of resources created in modals, this method returns the display name of the created object. Defaults to returning the
name
attribute.
-
get_object_id
(obj)[source] For dynamic insertion of resources created in modals, this method returns the id of the created object. Defaults to returning the
id
attribute.
-
modal_header
= ''
-
modal_id
= None
-
submit_label
= <django.utils.functional.__proxy__ object>
-
submit_url
= None
-