[Mpuls-commits] r1618 - wasko/branches/2.0/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 16 14:04:44 CET 2010


Author: torsten
Date: 2010-02-16 14:04:44 +0100 (Tue, 16 Feb 2010)
New Revision: 1618

Modified:
   wasko/branches/2.0/mpulsweb/lib/app_globals.py
Log:
* mpulsweb/lib/app_globals.py (Globals.__init__):  Load formed from
location defined in configurations file. Fall back to default location
(public/formed) if no formed path is defined.


Modified: wasko/branches/2.0/mpulsweb/lib/app_globals.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-16 12:57:05 UTC (rev 1617)
+++ wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-16 13:04:44 UTC (rev 1618)
@@ -60,11 +60,10 @@
         self.config_path = os.path.dirname(config_file)
         self.mpuls_config = MpulsConfig(config_file)
 
-        # Load formed. Formed is located in one of the locations for static
-        # files. Usually it can be found in the first location as this are the
-        # userdefined static files. 
-        public_dir = config.get('pylons.paths').get('static_files')[0]
-        formed_dir = os.path.join(public_dir, "formed")
+        # Load formed from defined location. If no location is defined. Take
+        # the default which is the formed dir under public.
+        formed_dir = config.get('mpuls.app.path.formed', 
+            os.path.join(config.get('pylons.paths').get('static_files')[0], 'formed')) 
         formed_file = os.path.join(formed_dir,
                                    self.mpuls_config.get('formed', 'treefile'))
         annotation_file = os.path.join(formed_dir,



More information about the Mpuls-commits mailing list