cubicweb/pyramid/init_instance.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 11 Oct 2016 10:24:13 +0200
changeset 11788 8e1fb9445d75
parent 11631 faf279e33298
permissions -rw-r--r--
[massive store] Drop useless check for empty buffer If something went wrong, an error will be raised.

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