[Mpuls-commits] r5367 - base/trunk/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Sep 16 16:58:50 CEST 2011
Author: torsten
Date: 2011-09-16 16:58:50 +0200 (Fri, 16 Sep 2011)
New Revision: 5367
Modified:
base/trunk/mpulsweb/model/meta.py
Log:
Added new method to model/meta to get a list of participating agencies for the
meta case.
Modified: base/trunk/mpulsweb/model/meta.py
===================================================================
--- base/trunk/mpulsweb/model/meta.py 2011-09-16 14:57:51 UTC (rev 5366)
+++ base/trunk/mpulsweb/model/meta.py 2011-09-16 14:58:50 UTC (rev 5367)
@@ -231,6 +231,17 @@
else:
raise MetaException(_('Case is not linked with any meta case.'))
+ def agencies(self):
+ """Return a list of agencies which are linked to the meta case as HTML
+ as a string."""
+ if self.is_linked():
+ rendered = get_meta_client().meta_agencies_as_html(self.meta_uuid)
+ self.last_download = datetime.today()
+ self._save()
+ return rendered
+ else:
+ raise MetaException(_('Case is not linked with any meta case.'))
+
def push(self):
"""Upload the case data to the linked meta case."""
if self.is_linked():
More information about the Mpuls-commits
mailing list