migration/postcreate.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Oct 2009 13:57:47 +0200
branchstable
changeset 309 dec84f991c96
parent 206 31ed5113cb11
child 507 c45710d2ea73
permissions -rw-r--r--
migration script

# 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',))

create_entity('Bookmark', title=_('quick tests summary'),
           path=u'view?rql=Any+X%2CXN+ORDERBY+XN+WHERE+X+is+TestConfig%2C+X+name+XN%2C+X+in_state+S%2C+S+name+%22activated%22&vid=summary')


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