[Mpuls-commits] r4582 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 7 10:25:44 CET 2011
Author: torsten
Date: 2011-02-07 10:25:43 +0100 (Mon, 07 Feb 2011)
New Revision: 4582
Added:
base/trunk/mpulsweb/controllers/statement.py
Log:
* mpulsweb/controllers/statement.py (StatementController): New
Statement controller. Very basic implementation yet. Should provide
much of the functionallity of the privacy controller in the future, so
privacy-controller will only handle accepting and declining
"Einwilligungserkl?\195?\164rung".
Added: base/trunk/mpulsweb/controllers/statement.py
===================================================================
--- base/trunk/mpulsweb/controllers/statement.py 2011-02-04 13:56:20 UTC (rev 4581)
+++ base/trunk/mpulsweb/controllers/statement.py 2011-02-07 09:25:43 UTC (rev 4582)
@@ -0,0 +1,29 @@
+import os
+import logging
+import formencode
+
+from pylons import request, response, session, tmpl_context as c
+from pylons.controllers.util import abort, redirect_to
+
+from mpulsweb.lib.base import BaseController, render
+
+log = logging.getLogger(__name__)
+
+class StatementController(BaseController):
+
+ def index(self):
+ '''Returns a list of available statements'''
+ url = os.path.join('/statements', 'list.mako')
+ form = render(url)
+ return formencode.htmlfill.render(form, defaults={},
+ auto_insert_errors=False,
+ errors={})
+
+ def show(self, id):
+ '''Returns renderer Version of a statement. Id ist the name of the
+ template located under /template/statements'''
+ url = os.path.join('/statements', '%s.mako' % id)
+ form = render(url)
+ return formencode.htmlfill.render(form, defaults={},
+ auto_insert_errors=False,
+ errors={})
More information about the Mpuls-commits
mailing list