pyramid_cubicweb/init_instance.py
author Christophe de Vienne <christophe@unlish.com>
Wed, 22 Oct 2014 16:15:54 +0200
changeset 11514 82e86cd8e217
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Move PyramidCWTest to pyramid_cubicweb.tests

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