在Pylons sample code关于“helpers”之后,有以下代码片段:
${h.form(h.url(action='email'), method='get')}
Email Address: ${h.text('email')}
${h.submit('Submit')}
${h.end_form()}
然而,显然,当服务器抛出AttributeError: 'module' object has no attribute 'url'
时,WebHelpers中没有url
方法。你知道吗
我做错什么了吗?如果不是,那么url()
的等价物是什么?你知道吗
对刚接触塔架的人来说有些晦涩难懂。文件里应该提到的,伊莫。你知道吗
“Mocking away the url object in Pylons”的答案有我的答案。我需要
from pylons import url
在helpers.py
。你知道吗相关问题 更多 >
编程相关推荐