[Mpuls-commits] r5574 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Nov 15 11:27:06 CET 2011
Author: torsten
Date: 2011-11-15 11:27:05 +0100 (Tue, 15 Nov 2011)
New Revision: 5574
Modified:
base/trunk/mpulsweb/controllers/mpuls.py
Log:
Added new function "apply_hooks" which is called whenever the blackboard
opens. This function can be used to add specific logic in the applicaten like
checks on cases etc. The function does nothing in base an can be overwritten
in the specific application.
Modified: base/trunk/mpulsweb/controllers/mpuls.py
===================================================================
--- base/trunk/mpulsweb/controllers/mpuls.py 2011-11-11 17:38:32 UTC (rev 5573)
+++ base/trunk/mpulsweb/controllers/mpuls.py 2011-11-15 10:27:05 UTC (rev 5574)
@@ -37,9 +37,18 @@
# Global appointments
log.debug('Loading global appointment list')
c.globalappointmentlist = self.get_global_appointments()
+
+ if h.hasRole(['cm']):
+ self.apply_hooks()
return render('/home/home.mako')
+ def apply_hooks(self):
+ '''Perform actions on the cases the the blackboard is loaded. E.g
+ create new RG instances etc. Should be overwritten in specific
+ application.'''
+ pass
+
def get_newslist(self, user):
""" Return an agency wide newslist """
More information about the Mpuls-commits
mailing list