Skip to main content

Django Workflow Library

Project description

Logo

Build Status Coverage Status Code Health Documentation Status

Contributors are welcome. Come and give a hand :-)

River is an open source workflow framework for Django which support on the fly changes instead of hardcoding states, transitions and authorization rules.

The main goal of developing this framework is to be able to edit any workflow item on the fly. This means that all the elements in a workflow like states, transitions or authorizations rules are editable at any time so that no changes requires a re-deploying of your application anymore.

Playground: There is a fake jira example repository as a playground of django-river. https://github.com/javrasya/fakejira

Documentation

Online documentation is available at http://django-river.rtfd.org/.

Requirements

  • Python (2.7, 3.4, 3.5, 3.6)

  • Django (1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1)

  • Django >= 2.0 is supported for Python >= 3.5

  • Django == 1.7 is only supported for Python == 2.7 and Python == 3.4

Usage

  1. Install and enable it

    pip install django-river
    INSTALLED_APPS=[
    ...
    river
    ...
    ]
  2. Create your first state machine in your model and migrate your db

    from django.db import models
    from river.models.fields.state import StateField
    
    class MyModel(models.Model):
        my_state_field = StateField()
  3. Create your states as one of them will be your initial state on the admin page

  4. Create your transition approval metadata with your model (MyModel - my_state_field) information and authorization rules along with their priority on the admin page

  5. Enjoy your django-river journey.

    my_model=MyModel.objects.get(....)
    
    my_model.river.my_state_field.approve(as_user=transactioner_user)
    my_model.river.my_state_field.approve(as_user=transactioner_user,next_state=State.objects.get(label='re-opened'))
    
    # and much more. Check the documentation

Example Scenarios

Simple Issue Tracking System

Re-Open case

Re Open Case

Closed without Re-Open case

Closed Without Re Open Case

Closed with Re-Open case

Closed With Re Open Case

Contribute

Contributions are welcome! Please join making always totally free django-river better.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-river-1.0.0.tar.gz (22.6 kB view hashes)

Uploaded Source

Built Distributions

django_river-1.0.0-py3.6.egg (89.0 kB view hashes)

Uploaded Source

django_river-1.0.0-py2.py3-none-any.whl (48.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page