The horizon.workflows.views Module¶
-
class
horizon.workflows.views.WorkflowView[source] Bases:
horizon.forms.views.ModalBackdropMixin,django.views.generic.base.TemplateViewA generic class-based view which handles the intricacies of workflow processing with minimal user configuration.
-
template_name¶ The template to use when rendering this view via standard HTTP requests. Required.
-
ajax_template_name¶ The template to use when rendering the workflow for AJAX requests. In general the default common template should be used. Defaults to
"horizon/common/_workflow.html".
-
context_object_name¶ The key which should be used for the workflow object in the template context. Defaults to
"workflow".
-
add_error_to_step(error_msg, step)[source]
-
ajax_template_name= 'horizon/common/_workflow.html'
-
context_object_name= 'workflow'
-
get(request, *args, **kwargs)[source] Handler for HTTP GET requests.
-
get_context_data(**kwargs)[source] Returns the template context, including the workflow class.
This method should be overridden in subclasses to provide additional context data to the template.
-
get_initial()[source] Returns initial data for the workflow. Defaults to using the GET parameters to allow pre-seeding of the workflow context values.
-
get_layout()[source] returns classes for the workflow element in template based on the workflow characteristics
-
get_object_display(obj)[source]
-
get_object_id(obj)[source]
-
get_template_names()[source] Returns the template name to use for this request.
-
get_workflow()[source] Returns the instantiated workflow class.
-
post(request, *args, **kwargs)[source] Handler for HTTP POST requests.
-
set_workflow_step_errors(context)[source]
-
step_errors= {}
-
template_name= 'horizon/common/_workflow_base.html'
-
validate_steps(request, workflow, start, end)[source] Validates the workflow steps from
starttoend, inclusive.Returns a dict describing the validation state of the workflow.
-
workflow_class= None
-