pyramid_cubicweb/core.py
changeset 11502 e4682c567e86
parent 11500 8e4935a1848b
child 11504 8701caf9edf0
--- 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)