menu

Task Views

viewflow.flow.views.task.FlowViewMixin

alias of viewflow.flow.views.task.FlowMixin

class viewflow.flow.views.UpdateProcessView(*args, **kwargs)

Bases: viewflow.flow.views.task.FlowMixin, django.views.generic.edit.UpdateView

get_object(queryset=None)

Return the process for the task activation.

property model

Process class.

class viewflow.flow.views.AssignTaskView(**kwargs)

Bases: viewflow.flow.views.mixins.MessageUserMixin, django.views.generic.base.TemplateView

Default assign view for flow task.

Get confirmation from user, assigns task and redirects to task pages

dispatch(request, *args, **kwargs)

Check permissions and assign task to the current user.

get_context_data(**kwargs)

Context for a detail view.

Parameters

activation – the task activation instance

get_success_url()

Continue on task or redirect back to task list.

get_template_names()

List of template names to be used for a process detail page.

If template_name is None, default value is:

[<app_label>/<flow_label>/<task_name>_assign.html,
 <app_label>/<flow_label>/task_assign.html,
 'viewflow/flow/task_assign.html']
post(request, *args, **kwargs)

Assign task to the current user.

Expect that form submitted with _continue or _assign button:

<button type="submit" name="_continue">Assign and continue on this process</button>
<button type="submit" name="_assign">Assign</button>
class viewflow.flow.views.UnassignTaskView(**kwargs)

Bases: viewflow.flow.views.actions.BaseTaskActionView

Deassign task from the current owner.

can_proceed()

Check that task is assigned and user has rights to deassign it.

perform()

Unassign the task from the current owner.