cubicweb/pyramid/init_instance.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Wed, 08 Feb 2017 17:49:25 +0100
changeset 11957 48b8fbc88209
parent 11631 faf279e33298
permissions -rw-r--r--
[server] Reprase messages of db-check to avoid using "system" and "sources" And rather mention "entity type table" and "entities" table, which are clearer references.

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