Pylons和WebHelpers:url()方法

2024-04-24 07:41:15 发布

您现在位置:Python中文网/ 问答频道 /正文

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()的等价物是什么?你知道吗


Tags: sample代码textformurlgetaddressemail
1条回答
网友
1楼 · 发布于 2024-04-24 07:41:15

对刚接触塔架的人来说有些晦涩难懂。文件里应该提到的,伊莫。你知道吗

Mocking away the url object in Pylons”的答案有我的答案。我需要from pylons import urlhelpers.py。你知道吗

相关问题 更多 >