The horizon.workflows.views Module

class horizon.workflows.views.WorkflowView[source]

Bases: django.views.generic.base.TemplateView

A generic class-based view which handles the intricacies of workflow processing with minimal user configuration.

horizon.workflows.views.workflow_class

The Workflow class which this view handles. Required.

horizon.workflows.views.template_name

The template to use when rendering this view via standard HTTP requests. Required.

horizon.workflows.views.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".

horizon.workflows.views.context_object_name

The key which should be used for the workflow object in the template context. Defaults to "workflow".

WorkflowView.add_error_to_step(error_msg, step)[source]
WorkflowView.ajax_template_name = 'horizon/common/_workflow.html'
WorkflowView.context_object_name = 'workflow'
WorkflowView.get(request, *args, **kwargs)[source]

Handler for HTTP GET requests.

WorkflowView.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.

WorkflowView.get_initial()[source]

Returns initial data for the workflow. Defaults to using the GET parameters to allow pre-seeding of the workflow context values.

WorkflowView.get_object_display(obj)[source]
WorkflowView.get_object_id(obj)[source]
WorkflowView.get_template_names()[source]

Returns the template name to use for this request.

WorkflowView.get_workflow()[source]

Returns the instanciated workflow class.

WorkflowView.post(request, *args, **kwargs)[source]

Handler for HTTP POST requests.

WorkflowView.set_workflow_step_errors(context)[source]
WorkflowView.step_errors = {}
WorkflowView.template_name = None
WorkflowView.workflow_class = None

Previous topic

The horizon.workflows Module

Next topic

The horizon.workflows.base Module

This Page