[Mpuls-commits] r5971 - base/trunk/mpulsweb/controllers
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Tue May 29 12:55:53 CEST 2012
Author: ludwig
Date: 2012-05-29 12:55:53 +0200 (Tue, 29 May 2012)
New Revision: 5971
Modified:
base/trunk/mpulsweb/controllers/settings.py
Log:
Move generation of EditSettingForm into a method.
This simplifies overwriting the validator EditSettingForm.
Modified: base/trunk/mpulsweb/controllers/settings.py
===================================================================
--- base/trunk/mpulsweb/controllers/settings.py 2012-05-29 10:39:55 UTC (rev 5970)
+++ base/trunk/mpulsweb/controllers/settings.py 2012-05-29 10:55:53 UTC (rev 5971)
@@ -24,6 +24,9 @@
def _get_agency(self):
return Agency()
+ def _get_settings_validator(self):
+ return EditSettingsForm()
+
def show(self):
c.form_errors = {}
c.form_result = {}
@@ -43,7 +46,7 @@
@checkRole('admin')
def editAction(self):
- validator = EditSettingsForm()
+ validator = self._get_settings_validator()
c.agency = self._get_agency()
try:
c.form_result = validator.to_python(request.params)
More information about the Mpuls-commits
mailing list