Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datakurre/pyramid_workflow
A Pyramid-only fork of substanced.workflow
https://github.com/datakurre/pyramid_workflow
Last synced: about 2 months ago
JSON representation
A Pyramid-only fork of substanced.workflow
- Host: GitHub
- URL: https://github.com/datakurre/pyramid_workflow
- Owner: datakurre
- License: other
- Created: 2014-05-09T17:18:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-11T15:47:33.000Z (over 10 years ago)
- Last Synced: 2024-10-24T19:37:31.556Z (3 months ago)
- Language: Python
- Size: 188 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
pyramid_workflow
================.. image:: https://secure.travis-ci.org/datakurre/pyramid_workflow.png
:target: http://travis-ci.org/datakurre/pyramid_workflowThis package is a shameless derivate of ``substanced.workflow`` module without
``substanced`` dependencies (besides its LICENSE, of course).Differences from ``substanced.workflow``:
- workflow requires ``state_attr`` as its first positional argument
similarly to the original ``repoze.workflow`` (and because of that
parallel workflows should use different ``state_attr``)- content-type related checks are removed, because there's no more
global content registry (``substanced.content``).Example of use:
.. code:: python
from pyramid_workflow import Workflow
task_workflow = Workflow(state_attr='task_state',
initial_state='new',
type='task')task_workflow.add_state('new')
task_workflow.add_state('working')
task_workflow.add_state('done')task_workflow.add_transition('start',
from_state='new',
to_state='working')
task_workflow.add_transition('complete',
from_state='working',
to_state='done')
task_workflow.add_transition('abort',
from_state='working',
to_state='new')def includeme(config):
config.add_workflow(task_workflow, content_types=('my_type',))See also: http://substanced.readthedocs.org/en/latest/workflows.html