pyramid_cubicweb/init_instance.py
author Julien Cristau <julien.cristau@logilab.fr>
Thu, 23 Jul 2015 17:56:59 +0200
changeset 11584 965caa6e848d
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Added tag 0.4.0, debian/0.4.0-1 for changeset 897a149e8208

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