cubicweb/pyramid/init_instance.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Mon, 20 Mar 2017 17:38:43 +0100
branch3.24
changeset 12077 e282711ac6b2
parent 11631 faf279e33298
permissions -rw-r--r--
Added tag 3.24.7, debian/3.24.7-1, centos/3.24.7-1 for changeset 58f1e8545a77

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