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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed May 26 18:35:37 CEST 2010


Author: bh
Date: 2010-05-26 18:35:35 +0200 (Wed, 26 May 2010)
New Revision: 2775

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/news.py
Log:
* mpulsweb/controllers/news.py (NewsController.hide): Use
h.url_for consistently for all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-26 16:07:26 UTC (rev 2774)
+++ base/trunk/ChangeLog	2010-05-26 16:35:35 UTC (rev 2775)
@@ -1,5 +1,10 @@
 2010-05-26  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/news.py (NewsController.hide): Use
+	h.url_for consistently for all-intra application URLs.
+
+2010-05-26  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/appointment.py: Add missing import.
 
 2010-05-26  Bernhard Herzog  <bh at intevation.de>

Modified: base/trunk/mpulsweb/controllers/news.py
===================================================================
--- base/trunk/mpulsweb/controllers/news.py	2010-05-26 16:07:26 UTC (rev 2774)
+++ base/trunk/mpulsweb/controllers/news.py	2010-05-26 16:35:35 UTC (rev 2775)
@@ -6,6 +6,7 @@
 from pylons.controllers.util import redirect_to
 from pylons.i18n import _, ungettext
 
+from mpulsweb.lib.helpers import url_for
 from mpulsweb.lib.base import BaseController, render
 from mpulsweb.model.user import UserObject
 
@@ -34,8 +35,9 @@
         else:
             c.dialog_title = MARK_NEWS_AS_READ_CONFIRM
             c.dialog_text = MARK_NEWS_AS_READ_CONFIRM_TEXT
-            c.url_yes = "/news/hide/%s/1" % id
-            c.url_no = "/"
+            c.url_yes = url_for(controller='/news', action='hide', id=id,
+                                confirmed=1)
+            c.url_no = url_for("/")
             return render('/news/dialogs/confirm_mark_news_as_read.mako')
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list