pyramid_cubicweb/init_instance.py
author Christophe de Vienne <christophe@unlish.com>
Wed, 21 Jan 2015 15:14:11 +0100
changeset 11546 0797bfbd9a04
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Fix the 0.2.0 release date

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