Code


Version 3 (modified by goflow@…, 7 years ago) (diff)

--

GoFlow: a workflow engine for Django

News:

Sites

  • contact: goflow(at)alwaysdata.net

The Leave workflow application

settings file

standard settings

INSTALLED_APPS = (
    ....
    'django.contrib.workflow',    # uses the workflow engine
    'leavedemo.leave',            # the leave application
)

specific settings

WF_APPS_PREFIX = 'leavedemo'

This is the url prefix for workflow application definition; for example, in the workflow definition the application app1 is mapped on the url /leavedemo/app1

WF_PUSH_APPS_PREFIX = 'leavedemo.leave.pushapplications'

this is the module containing the push applications functions; for example, the push application pushapp1 is a function defined as following in the leavedemo/leave/pushapplications.py module:

def pushapp1(workitem):
    ...
    return aUser

urls.py file

Starting a workflow instance

the start_application is a handler that display a form used to create an instance of the workflow process:

usage:

    (r'^leavedemo/request/$',
     'django.contrib.workflow.applications.start_application',
     {'process_name':'leave', 'form_class':RequestForm, 'template':'start_leave.html'}),

next soon ...

Attachments (3)

Download all attachments as: .zip