# HG changeset patch # User Christophe de Vienne # Date 1409160404 -7200 # Node ID e4682c567e86117ddb293e7a32bc3c90658638d6 # Parent fcf7f99fad4a6b4d1a77c1762e1d621e91fc75f9 If any cube has a 'includeme' attribute, call config.include on it Related to #4291181 diff -r fcf7f99fad4a -r e4682c567e86 pyramid_cubicweb/core.py --- a/pyramid_cubicweb/core.py Thu Aug 21 21:55:58 2014 +0200 +++ b/pyramid_cubicweb/core.py Wed Aug 27 19:26:44 2014 +0200 @@ -191,3 +191,11 @@ _cw_cnx, name='cw_cnx', property=True, reify=True) config.add_request_method( _cw_request, name='cw_request', property=True, reify=True) + + cwcfg = config.registry['cubicweb.config'] + for cube in cwcfg.cubes(): + pkgname = 'cubes.' + cube + mod = __import__(pkgname) + mod = getattr(mod, cube) + if hasattr(mod, 'includeme'): + config.include('cubes.' + cube)