[Mpuls-commits] r5829 - base/trunk/mpulsweb/controllers
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 27 10:58:48 CET 2012
Author: roland
Date: 2012-02-27 10:58:47 +0100 (Mon, 27 Feb 2012)
New Revision: 5829
Modified:
base/trunk/mpulsweb/controllers/formularpage.py
Log:
Replace the deprecated redirect_to() with redirect(url())
Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py 2012-02-27 09:57:40 UTC (rev 5828)
+++ base/trunk/mpulsweb/controllers/formularpage.py 2012-02-27 09:58:47 UTC (rev 5829)
@@ -2,8 +2,8 @@
import logging
-from pylons import request, tmpl_context as c, app_globals as g
-from pylons.controllers.util import abort, redirect_to
+from pylons import request, tmpl_context as c, app_globals as g, url
+from pylons.controllers.util import abort, redirect
from pylons.i18n.translation import get_lang
from formed.instance.backends.postgres import DBFactory as InstanceFactory
@@ -264,14 +264,14 @@
for param in request.params:
if param.startswith('add_rg') and not param.endswith(('x', 'y')):
if param == 'add_rg':
- redirect_to(controller='/repeatgroup', action="new",
- id=request.params.get('add_rg'))
+ redirect(url(controller='/repeatgroup', action="new",
+ id=request.params.get('add_rg')))
else:
- redirect_to(controller='/repeatgroup', action="new",
- id=param.split('|')[1])
+ redirect(url(controller='/repeatgroup', action="new",
+ id=param.split('|')[1]))
elif param.startswith('del_rg') and not param.endswith(('x', 'y')):
- redirect_to(controller='/repeatgroup', action="delete",
- id=param.split('|')[1])
+ redirect(url(controller='/repeatgroup', action="delete",
+ id=param.split('|')[1]))
@checkRole(('admin', 'cm', 'pt_dlr'))
More information about the Mpuls-commits
mailing list