[i18ncube] we must load site_cubicweb file before calling set_schema, else we may miss some options or other initialization stuff necessary to appobject loading stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 18 May 2010 10:30:34 +0200
branchstable
changeset 5534 b75aa6ce0c04
parent 5533 5cb121d4f02f
child 5535 b32b8f56192a
[i18ncube] we must load site_cubicweb file before calling set_schema, else we may miss some options or other initialization stuff necessary to appobject loading
cwconfig.py
devtools/devctl.py
--- a/cwconfig.py	Tue May 18 10:28:50 2010 +0200
+++ b/cwconfig.py	Tue May 18 10:30:34 2010 +0200
@@ -957,7 +957,10 @@
 
     def load_site_cubicweb(self):
         """load instance's specific site_cubicweb file"""
-        for path in reversed([self.apphome] + self.cubes_path()):
+        paths = self.cubes_path()
+        if self.apphome is not None:
+            paths = [self.apphome] + paths
+        for path in reversed(paths):
             sitefile = join(path, 'site_cubicweb.py')
             if exists(sitefile) and not sitefile in self._site_loaded:
                 self._load_site_cubicweb(sitefile)
--- a/devtools/devctl.py	Tue May 18 10:28:50 2010 +0200
+++ b/devtools/devctl.py	Tue May 18 10:30:34 2010 +0200
@@ -58,6 +58,7 @@
         if cubes:
             self._cubes = self.reorder_cubes(
                 self.expand_cubes(cubes, with_recommends=True))
+            self.load_site_cubicweb()
         else:
             self._cubes = ()