pyramid_cubicweb/init_instance.py
author Julien Cristau <julien.cristau@logilab.fr>
Mon, 06 Oct 2014 10:32:38 +0200
changeset 11515 b3267ba817b4
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Initial debian packaging missing at least a long description and wsgicors dependency.

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