[Mpuls-commits] r6160 - wasko/trunk/waskoweb/lib

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Dec 18 14:35:28 CET 2012


Author: torsten
Date: 2012-12-18 14:35:28 +0100 (Tue, 18 Dec 2012)
New Revision: 6160

Added:
   wasko/trunk/waskoweb/lib/app_globals.py
Log:
Added overwritten app_globals to load the formed dynamically


Added: wasko/trunk/waskoweb/lib/app_globals.py
===================================================================
--- wasko/trunk/waskoweb/lib/app_globals.py	                        (rev 0)
+++ wasko/trunk/waskoweb/lib/app_globals.py	2012-12-18 13:35:28 UTC (rev 6160)
@@ -0,0 +1,13 @@
+"""The application's Globals object"""
+import os
+import logging
+import mpulsweb.lib.app_globals
+from formed.meta.io.document import openDocument
+log = logging.getLogger(__name__)
+
+class Globals(mpulsweb.lib.app_globals.Globals):
+    def _load_formedtree_from_file(self, formed_file):
+        # Build FormedTree. This tree will work as template for all cases
+        log.debug("loading formedtree definition with rules for WASKO from %r", 
+            formed_file)
+        return openDocument(formed_file, generate_rules=True)



More information about the Mpuls-commits mailing list