[Mpuls-commits] r1638 - in wasko/branches/2.0: . waskaweb/lib

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


Author: bh
Date: 2010-02-16 17:14:29 +0100 (Tue, 16 Feb 2010)
New Revision: 1638

Added:
   wasko/branches/2.0/waskaweb/lib/app_globals.py
Modified:
   wasko/branches/2.0/ChangeLog
Log:
* waskaweb/lib/app_globals.py: New.  WASKO-specific globals,
including the instance of CaseFactory to use to instantiate
WASKO-Case objects


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-16 15:44:16 UTC (rev 1637)
+++ wasko/branches/2.0/ChangeLog	2010-02-16 16:14:29 UTC (rev 1638)
@@ -1,5 +1,11 @@
 2010-02-16  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/lib/app_globals.py: New.  WASKO-specific globals,
+	including the instance of CaseFactory to use to instantiate
+	WASKO-Case objects
+
+2010-02-16  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/config/environment.py (load_environment): Import
 	app_globals using import_overridable_module so that it can be
 	overridden in an MPuls specialization

Added: wasko/branches/2.0/waskaweb/lib/app_globals.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/app_globals.py	2010-02-16 15:44:16 UTC (rev 1637)
+++ wasko/branches/2.0/waskaweb/lib/app_globals.py	2010-02-16 16:14:29 UTC (rev 1638)
@@ -0,0 +1,20 @@
+"""Extend the MPuls app_globals for WASKO"""
+
+from mpulsweb.lib.app_globals import Globals as MPulsGlobals
+
+from waskaweb.model.case import CaseFactory
+
+
+class Globals(MPulsGlobals):
+
+    """This Globals class extends the base class with the following objects:
+
+       case_factory -- The factory to use to instantiate Case objects
+    """
+
+    def __init__(self):
+        MPulsGlobals.__init__(self)
+        self._init_case()
+
+    def _init_case(self):
+        self.case_factory = CaseFactory()


Property changes on: wasko/branches/2.0/waskaweb/lib/app_globals.py
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native



More information about the Mpuls-commits mailing list