Skip to main content
https://travis-ci.org/unistra/django-workflow-activity.svg?branch=master https://coveralls.io/repos/unistra/django-workflow-activity/badge.svg?branch=master

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()
...

Metadata

Release files for django-workflow-activity 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-workflow-activity 1.2.0
File Size Uploaded Provenance Actions
django-workflow-activity-1.2.0.tar.gz 7.2 kB Without provenance Details for django-workflow-activity-1.2.0.tar.gz

Release files / django-workflow-activity-1.2.0.tar.gz

Download URL django-workflow-activity-1.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3c65d2b589eeb0c670e604ee71f9e3199377338238761e0067fae49fcadf78c5
BLAKE2b-256 checksum
How to use checksums
2a6cd4f0a85f3ed8d5d54a41ba38e762586ee6602d78c70428e9cc79840c53ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Security for django-workflow-activity 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page