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

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 8 12:52:14 CET 2012


Author: ludwig
Date: 2012-03-08 12:52:14 +0100 (Thu, 08 Mar 2012)
New Revision: 5881

Modified:
   base/trunk/mpulsweb/controllers/administration.py
   base/trunk/mpulsweb/controllers/case.py
   base/trunk/mpulsweb/controllers/formularpage.py
Log:
Issue 2939: Change redirect(url(..)) call.
Bugfix, controller should not have a leading / in url.
Remove this. Add some actions.


Modified: base/trunk/mpulsweb/controllers/administration.py
===================================================================
--- base/trunk/mpulsweb/controllers/administration.py	2012-03-08 10:43:38 UTC (rev 5880)
+++ base/trunk/mpulsweb/controllers/administration.py	2012-03-08 11:52:14 UTC (rev 5881)
@@ -336,7 +336,7 @@
             except formencode.Invalid, error:
                 return self.deleteUser(form_result.get('user_id'), '1')
         else:
-            redirect(url(controller="/administration", action='overviewUser'))
+            redirect(url(controller="administration", action='overviewUser'))
 
     # USERGROUPS
     @checkRole('admin')

Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py	2012-03-08 10:43:38 UTC (rev 5880)
+++ base/trunk/mpulsweb/controllers/case.py	2012-03-08 11:52:14 UTC (rev 5881)
@@ -39,7 +39,7 @@
 
     @checkRole(('admin', 'cm', 'pt_dlr'))
     def index(self):
-        redirect(url(controller="/case_overview"))
+        redirect(url(controller="case_overview", action="index"))
 
     @checkRole(('admin', 'cm', 'pt_dlr'))
     @checkPrivacyStatement()

Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py	2012-03-08 10:43:38 UTC (rev 5880)
+++ base/trunk/mpulsweb/controllers/formularpage.py	2012-03-08 11:52:14 UTC (rev 5881)
@@ -2,7 +2,7 @@
 
 import logging
 
-from pylons import request, tmpl_context as c, app_globals as g, url
+from pylons import request, tmpl_context as c, app_globals as g
 from pylons.controllers.util import abort, redirect
 from pylons.i18n.translation import get_lang
 
@@ -16,7 +16,7 @@
 from mpulsweb.lib.db import  PostgresDBInterface
 from mpulsweb.lib.navigation import mark_folderopen, get_navigation
 from mpulsweb.lib.base import BaseController, render, session
-from mpulsweb.lib.helpers import url_for, literal
+from mpulsweb.lib.helpers import url_for, literal, url
 from mpulsweb.lib.formedrenderer import ViewRenderer, ViewPrintRenderer, \
         UrlFactory
 
@@ -264,13 +264,13 @@
         for param in request.params:
             if param.startswith('add_rg') and not param.endswith(('x', 'y')):
                 if param == 'add_rg':
-                    redirect(url(controller='/repeatgroup', action="new",
+                    redirect(url(controller='repeatgroup', action="new",
                                 id=request.params.get('add_rg')))
                 else:
-                    redirect(url(controller='/repeatgroup', action="new",
+                    redirect(url(controller='repeatgroup', action="new",
                                 id=param.split('|')[1]))
             elif param.startswith('del_rg') and not param.endswith(('x', 'y')):
-                redirect(url(controller='/repeatgroup', action="delete",
+                redirect(url(controller='repeatgroup', action="delete",
                             id=param.split('|')[1]))
 
 



More information about the Mpuls-commits mailing list