cubicweb/pyramid/init_instance.py
author Yann Voté <yann.vote@logilab.fr>
Mon, 26 Sep 2016 16:45:30 +0200
changeset 11681 b23d58050076
parent 11631 faf279e33298
permissions -rw-r--r--
Merge cubicweb-pyramid cube Only keep the CWSession schema definition and the ctl command, now in cubicweb/pyramid/pyramidctl.py Related to #14023058.

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