-from myslice.configengine import ConfigEngine
-configEngine = ConfigEngine()
-if configEngine.myslice.theme :
- theme = configEngine.myslice.theme
-
-# find out HTTPROOT, which is different from ROOT
-# when deployed from a package
-# this code is run by collectstatic too, so we cannot
-# assume we have ./static present already
-HTTPROOT="/usr/share/unfold"
-# the place to store local data, like e.g. the sqlite db
-DATAROOT="/var/unfold"
+if config.myslice.theme :
+ theme = config.myslice.theme
+else :
+ theme = None
+
+# HTTPROOT
+if config.myslice.httproot :
+ HTTPROOT = config.myslice.httproot
+else :
+ HTTPROOT = "/var/myslice-f4f"
+
+# DATAROOT
+if config.myslice.httproot :
+ DATAROOT = config.myslice.httproot
+else :
+ DATAROOT = "/var/unfold"
+
+if not os.path.isdir(DATAROOT):
+ print("WARNING: {} is a non-existing directory".format(DATAROOT))
+ print("consequently we assume development mode and re-route DATAROOT to {}".format(ROOT))
+ DATAROOT=ROOT
+