View mixins¶
- class viewflow.flow.views.mixins.FlowViewPermissionMixin¶
Mixin for flow views, check the view permission.
- class viewflow.flow.views.mixins.FlowManagePermissionMixin¶
Mixin for flow flow views, check flow manage permission.
- class viewflow.flow.views.mixins.FlowTaskManagePermissionMixin¶
Mixin for flow task views, check flow manage permission.
- class viewflow.flow.views.mixins.MessageUserMixin¶
Notify a user using django messaging system.
- error(message, fail_silently=True, **kwargs)¶
Notification about an error.
- report(message, level=20, fail_silently=True, **kwargs)¶
Send a notification with link to the current process or task.
- Parameters
message – A message template.
level – A level, one of https://docs.djangoproject.com/en/1.10/ref/contrib/messages/#message-levels
fail_silently – Raise a error if messaging framework is not installed.
kwargs – Additional parametes used in format message templates.
A message_template prepared by python .format() function. In addition to kwargs, the {process} and {task} parametes passed.
Example:
self.report('Task {task} from {process} has been completed.')
- success(message, fail_silently=True, **kwargs)¶
Notification about successful operation.