我出错了:
GenerationException: url_for could not generate URL. Called with args: () {}
从这行Mako模板:
<p>Your url is ${h.url_for()}</p>
在我的helpers.py里,我确实有:
from routes import url_for
看着routes-1.12.1-py2.6.egg/routes/util.py,我似乎要走了。 它调用的行_screenargs()出错。
这是《塔架手册》中的简单功能。我做错了什么蠢事?有没有新的url_current()?在哪里?
我不知道 url_for() (没有论据)曾经是合法的,但如果它是,这就是你所说的“url-current”,我相信 new approach 是使用 url 对象,对其调用方法作为 url.current() .
url_for()
url
url.current()