[Mpuls-commits] r5776 - in base/trunk: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 19 13:32:39 CET 2012
Author: ludwig
Date: 2012-01-19 13:32:38 +0100 (Thu, 19 Jan 2012)
New Revision: 5776
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/lib/formedrenderer.py
Log:
Fix url_for at id=0 problem, use url_for once.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2012-01-19 11:40:29 UTC (rev 5775)
+++ base/trunk/ChangeLog 2012-01-19 12:32:38 UTC (rev 5776)
@@ -1,3 +1,8 @@
+2011-08-19 Ludwig Reiter <ludwig.reiter at intevation.de>
+
+ * mpulsweb/lib/formedrenderer.py:
+ Fix url_for at id=0 problem, use url_for once.
+
2011-08-19 Bernhard Herzog <bh at intevation.de>
* mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po: Update translations.
Modified: base/trunk/mpulsweb/lib/formedrenderer.py
===================================================================
--- base/trunk/mpulsweb/lib/formedrenderer.py 2012-01-19 11:40:29 UTC (rev 5775)
+++ base/trunk/mpulsweb/lib/formedrenderer.py 2012-01-19 12:32:38 UTC (rev 5776)
@@ -38,9 +38,10 @@
class UrlFactory(BaseUrlFactory):
def url_for(self, controller, action, id=None):
- if not id:
- return url_for(controller=controller, action=action)
- return url_for(controller=controller, action=action, id=id)
+ url_for_args = {"controller": controller, "action":action}
+ if not id is None:
+ url_for_args["id"] = id
+ return url_for(**url_for_args)
def icon(self, name):
"""Return the url for the icon given by name."""
More information about the Mpuls-commits
mailing list