Manage all events on workflows
Project description
Install
Install the package via pypi:
pip install django-workflow-activity
Add the installed application in the django settings file:
INSTALLED_APPS = ( ... 'workflow_activity' )
Migrate the database:
python manage.py migrate
Usage
To create workflows and permissions, see the following documentations:
To use workflow activity methods on a class :
from workflow_activity.models import WorkflowManagedInstance class MyClass(WorkflowManagedInstance): ...
To add a workflow to an object:
myobj = MyClass() myobj.set_workflow('My workflow')
Now, you can use methods on your object like:
myobj.last_state() myobj.last_transition() myobj.last_actor() myobj.last_action() myobj.allowed_transitions(request.user) myobj.is_editable_by(request.user, permission='edit') myobj.state() myobj.change_state(transition, request.user) ...
And managers like:
MyClass.objects.filter() MyClass.pending.filter() MyClass.ended.filter() ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-workflow-activity-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1b53667992511994746e8ba46b29d6e03205508209ce26ad0d83006df743bce |
|
MD5 | fdc85a3f1a68b3a2e5fa14ce0db001c8 |
|
BLAKE2b-256 | d7cee66f3b2db259ba7853d8b4b3e4b4392b0af4a158a237160713258bafdf94 |
Close
Hashes for django_workflow_activity-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d7d397d0de4832938704ad7733d78b730255497279c44a70d067e2414db65e |
|
MD5 | 22c8b39226bae17c5c73518aca2ec9c1 |
|
BLAKE2b-256 | c05d6cc8698e032462ee4e65debbc2a9e3294c9b780af91bb3b00d9bd1d1a6c4 |