pyramid_cubicweb/init_instance.py
author Christophe de Vienne <christophe@unlish.com>
Fri, 23 Jan 2015 14:00:02 +0100
changeset 11549 48a952dc108f
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Added tag pyramid_cubicweb-version-0.2.1, pyramid_cubicweb-debian-version-0.2.1-1 for changeset 1ae61c25299a

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