I'm getting an error:
GenerationException: url_for could not generate URL. Called with args: () {}
from this line of a mako template:
<p>Your url is ${h.url_for()}</p>
Over in my helpers.py, I do have:
from routes import url_for
Looking at the Routes-1.12.1-py2.6.egg/routes/util.py开发者_如何转开发, I seem to go wrong about line it calls _screenargs().
This is simple functionality from the Pylons book. What silly thing am I doing wrong? Was there a new url_current()? Where?
I didn't know url_for()
(no arguments) was ever legal, but if it was and this is what you're referring to as "url_current", I believe the new approach is to use the url
object, calling a method on it as url.current()
.
精彩评论