Skip to main content

Django-XWorkflows

https://secure.travis-ci.org/rbarrois/django_xworkflows.png?branch=master Latest Version Supported Python versions Wheel status License

Use XWorkflows along with Django models.

Django-XWorkflows allow to bind a Django model to a workflow, with a few extra features:

  • Auto-save after transitions

  • Log each action into the database

Define a workflow and add it to a model:

from django import models
from django_xworkflows import models as xwf_models

class MyWorkflow(xwf_models.Workflow):
    states = (
        ('new', _(u"New")),
        ('old', _(u"Old")),
    )
    transitions = (
        ('get_old', 'new', 'old'),
    )
    initial_state = 'new'

class MyModel(xwf_models.WorkflowEnabled, models.Model):

    state = xwf_models.StateField(MyWorkflow)

Use the workflow:

>>> obj = MyModel()
>>> obj.state  # Defaults to the initial_state
State('new')
>>> # Perform a transition
>>> obj.get_old()
>>> obj.state
State('old')
>>> # Object was saved to the database
>>> obj.pk
1
>>> # Logs were saved to the database
>>> xwf_models.TransitionLog.objects.all()
[TransitionLog(MyModel: new -> old at 2012-04-14T12:10:00+0200)]

Metadata

Release files for django-xworkflows-3 0.12.3.1

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-xworkflows-3 0.12.3.1
File Size Uploaded Provenance Actions
django_xworkflows_3-0.12.3.1.tar.gz 17.3 kB Without provenance Details for django_xworkflows_3-0.12.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-xworkflows-3 0.12.3.1
File Interpreter ABI Platform Actions
django_xworkflows_3-0.12.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for django_xworkflows_3-0.12.3.1-py2.py3-none-any.whl

Total release size: 34.8 kB

Release files / django_xworkflows_3-0.12.3.1.tar.gz

Download URL django_xworkflows_3-0.12.3.1.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6bf53fa5f30b8aaf689d07b6bee4cd4a3447a8565189cb2861c6eeb762a5867c
BLAKE2b-256 checksum
How to use checksums
71b972c71dfde9ecfb354f1d66cc9a3c3a6f33d0b846f4dd129dc35a067e67af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

Release files / django_xworkflows_3-0.12.3.1-py2.py3-none-any.whl

Download URL django_xworkflows_3-0.12.3.1-py2.py3-none-any.whl
Size 17.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4abbdb9cd8167577146347b2af30319585525dd34e7ccadd782c8e0d7d9331ac
BLAKE2b-256 checksum
How to use checksums
2e63ab5b2cc347af1e6b7496166dcdd6dcd66dc3f5f0c840b57553ad23c430ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

Security for django-xworkflows-3 0.12.3.1

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.

Release history Release notifications | RSS feed

This release

0.12.3.1 This release

2 release files No provenance

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