cubicweb/cwconfig.py
changeset 11793 b455460630a0
parent 11767 432f87a63057
child 11857 a166ddb503aa
child 11859 2e1a1ebd4730
--- a/cubicweb/cwconfig.py	Thu Oct 13 15:31:02 2016 +0200
+++ b/cubicweb/cwconfig.py	Wed Nov 02 15:59:39 2016 +0100
@@ -843,7 +843,13 @@
     def _load_site_cubicweb(self, cube):
         """Load site_cubicweb.py from `cube` (or apphome if cube is None)."""
         if cube is not None:
-            modname = 'cubes.%s.site_cubicweb' % cube
+            try:
+                modname = 'cubicweb_%s' % cube
+                __import__(modname)
+            except ImportError:
+                modname = 'cubes.%s' % cube
+                __import__(modname)
+            modname = modname + '.site_cubicweb'
             __import__(modname)
             return sys.modules[modname]
         else: