migration/postcreate.py
author David Douard <david.douard@logilab.fr>
Fri, 25 Jan 2013 23:08:52 +0100
branchstable
changeset 847 ff4868ee734f
parent 528 92f09c79dad5
child 838 34086b680de3
child 887 fccb89f0745a
permissions -rw-r--r--
2.2.4

# postcreate script. You could setup a workflow here for example

wf = add_workflow(u'Test configuration workflow', 'TestConfig')
activated = wf.add_state(_('activated'), initial=True)
deactivated = wf.add_state(_('deactivated'))
wf.add_transition(_('deactivate'), activated, deactivated,
                  requiredgroups=('managers',))
wf.add_transition(_('activate'), deactivated, activated,
                  requiredgroups=('managers',))

from cubes.apycot import recipes
recipes.create_quick_recipe(session)

if not config['pyro-server']:
    config.global_set_option('pyro-server', True)
    config.save()