[Mpuls-commits] r3111 - in base/trunk: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 2 12:14:24 CEST 2010


Author: bh
Date: 2010-07-02 12:14:23 +0200 (Fri, 02 Jul 2010)
New Revision: 3111

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/formularpage.py
Log:
* mpulsweb/controllers/formularpage.py
(FormularpageController.save): Use redirect_to instead of redirect
with an explicit url_for call.  The former combines redirect and
url_for.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-07-02 10:13:22 UTC (rev 3110)
+++ base/trunk/ChangeLog	2010-07-02 10:14:23 UTC (rev 3111)
@@ -1,5 +1,12 @@
 2010-07-02  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/formularpage.py
+	(FormularpageController.save): Use redirect_to instead of redirect
+	with an explicit url_for call.  The former combines redirect and
+	url_for.
+
+2010-07-02  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/formularpage.py: pylons.h is deprecated.
 	The onyl thing used from that module was 'url'.
 	(FormularpageController.save): Use url_for from

Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py	2010-07-02 10:13:22 UTC (rev 3110)
+++ base/trunk/mpulsweb/controllers/formularpage.py	2010-07-02 10:14:23 UTC (rev 3111)
@@ -10,7 +10,7 @@
 from pylons import request, session, c
 from pylons import g
 from mpulsweb.lib.translation import _
-from pylons.controllers.util import abort, redirect
+from pylons.controllers.util import abort, redirect_to
 
 from formed.instance.backends.postgres import DBFactory as InstanceFactory
 from formed.instance.tree import SetDataException, RepeatInstanceContainerNode
@@ -202,11 +202,11 @@
             session.save()
             # How to proceed after saving the data?
             if request.params.has_key('add_rg'):
-                redirect(url_for(controller='repeatgroup', action="new",
-                                 id=request.params.get('add_rg')))
+                redirect_to(controller='repeatgroup', action="new",
+                            id=request.params.get('add_rg'))
             elif request.params.has_key('del_rg'):
-                redirect(url_for(controller='repeatgroup', action="delete",
-                                 id=request.params.get('del_rg')))
+                redirect_to(controller='repeatgroup', action="delete",
+                            id=request.params.get('del_rg'))
             elif request.params.has_key('savenext'):
                 page_id = session['navigation.tree'].getTreeItem(page_id).nextKey().key
 



More information about the Mpuls-commits mailing list