Lightweight, reusable workflow engine for Django applications
Project description
django-workflow
django-workflow
is a lightweight and reusable workflow engine for
Django applications. It enables you to better organise the business logic for
collaborating users.
Installation
pip install django-workflow
Getting started
Add the application to your Django settings INSTALLED_APPS
list:
INSTALLED_APPS = [
...
"django_workflow",
]
Add the built-in django-workflow
view urls to your project's urls.py
:
urlpatterns = [
...
path('flow/', include('django_workflow.urls')),
]
Building your first workflow
Create a workflow.py
in your project and add your uniquely named workflows.
from django_workflow import Step, Workflow
Onboard_Contractor = Workflow(
name="onboard_contractor",
steps=[
Step(...),
Step(...),
Step(...),
],
)
Onboard_Perm = Workflow(
name="onboard_perm",
steps=[
...
],
)
Add you workflows to your Django settings as follows:
DJANGO_WORKFLOWS = {
"onboard_contractor": Onboard_Contractor,
"onboard_perm": Onboard_Perm,
}
Run the django_workflow
migrations:
$ ./manage.py migrate
Finally, inform the workflow engine of the site domain
(DC: don't like - use Django Sites?)
DJANGO_WORKFLOWS_SITE = f"https://{ALLOWED_HOSTS[0]}"
Dependencies
Settings
Running tests
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
Close
Hashes for django-workflow-engine-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e91683eb80a8f7d85415a65204d8d9c6e24c1c79ac6032d07ef59b39a1ddb6dc |
|
MD5 | d7c77844263d1b24b2f8bf6b1e747e44 |
|
BLAKE2b-256 | 9acb66134b805a8b8688335deca51d4c54fac42d2f01b42d9c3db84330f9af11 |