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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-workflow-activity-1.0.9.tar.gz.
File metadata
- Download URL: django-workflow-activity-1.0.9.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fb4bbf3e712cba329349358b790fbb5d411f6e1efd5fe4f8605c0f12ffdb173
|
|
| MD5 |
c4191073201109dc5342fd1cf8e55de8
|
|
| BLAKE2b-256 |
d41c78f3f6ab1eb3ed72556ed018d53d20301475e14c39156198fdabc94b853f
|
File details
Details for the file django_workflow_activity-1.0.9-py2.py3-none-any.whl.
File metadata
- Download URL: django_workflow_activity-1.0.9-py2.py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48d6d83faa0ecac0fbb1f95bb66474c661fd1329d235ebb011cab9dcd953d8a8
|
|
| MD5 |
fad3c3aebf1ba4a9412ab83181322b3b
|
|
| BLAKE2b-256 |
5c30c38d9432cde1a58ff87a2ed026489004b5fee62dc3bdc3f8169311b05bad
|