migration/postcreate.py
author Stephanie Marcu <stephanie.marcu@logilab.fr>
Wed, 11 Aug 2010 14:26:12 +0200
branchnarval
changeset 528 92f09c79dad5
parent 507 c45710d2ea73
child 838 34086b680de3
child 887 fccb89f0745a
permissions -rw-r--r--
force use of local_repository relation (remove deprecated attributes) + fix tests

# 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()