[Mpuls-commits] r5969 - base/trunk/mpulsweb/controllers

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue May 29 12:39:18 CEST 2012


Author: ludwig
Date: 2012-05-29 12:39:17 +0200 (Tue, 29 May 2012)
New Revision: 5969

Modified:
   base/trunk/mpulsweb/controllers/settings.py
Log:
Move and rename get_agency into _get_agency.
Methods with a leading underscore aren't loadable actions.


Modified: base/trunk/mpulsweb/controllers/settings.py
===================================================================
--- base/trunk/mpulsweb/controllers/settings.py	2012-05-29 10:08:42 UTC (rev 5968)
+++ base/trunk/mpulsweb/controllers/settings.py	2012-05-29 10:39:17 UTC (rev 5969)
@@ -21,15 +21,18 @@
     def index(self):
         return self.show()
 
+    def _get_agency(self):
+        return Agency()
+
     def show(self):
         c.form_errors = {}
         c.form_result = {}
-        c.agency = self.get_agency()
+        c.agency = self._get_agency()
         return render('/settings/show.mako')
 
     @checkRole('admin')
     def edit(self):
-        c.agency = self.get_agency()
+        c.agency = self._get_agency()
         c.form_errors = {}
         c.form_result = c.agency.conf
         form = render('/settings/edit.mako')
@@ -41,7 +44,7 @@
     @checkRole('admin')
     def editAction(self):
         validator = EditSettingsForm()
-        c.agency = self.get_agency()
+        c.agency = self._get_agency()
         try:
             c.form_result = validator.to_python(request.params)
         except formencode.Invalid, error:
@@ -59,6 +62,4 @@
         c.url_ok = url(controller='settings', action='index')
         return render ('/settings/dialogs/success_edit.mako')
 
-    def get_agency(self):
-        return Agency()
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list