cubicweb/pyramid/init_instance.py
author Christophe de Vienne <christophe@unlish.com>
Mon, 11 May 2015 13:57:34 +0200
changeset 11963 64ecd4d96ac7
parent 11631 faf279e33298
permissions -rw-r--r--
[workflow] Utilities for declarative definition of workflows Closes #5337897

from cubicweb.cwconfig import CubicWebConfiguration


def includeme(config):
    appid = config.registry.settings['cubicweb.instance']
    cwconfig = CubicWebConfiguration.config_for(appid)

    config.registry['cubicweb.config'] = cwconfig
    config.registry['cubicweb.repository'] = repo = cwconfig.repository()
    config.registry['cubicweb.registry'] = repo.vreg