cubicweb/pyramid/init_instance.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 21 Oct 2016 18:03:06 +0200
changeset 11739 bc864c80ec36
parent 11631 faf279e33298
permissions -rw-r--r--
[twconfig] Set default value for "interface" to 0.0.0.0 This value means "all IP addresses on this host", which seems to fit with "default to everywhere" that's documented. Closes #15135610.

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