pyramid_cubicweb/init_instance.py
author Christophe de Vienne <christophe@unlish.com>
Thu, 18 Sep 2014 15:07:02 +0200
changeset 11508 ef8b9021b47b
parent 11492 b0b8942cdb80
permissions -rw-r--r--
Fix POST handling. The issues where revealed by the unittests, which are ported from the cubicweb wsgi 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