1

我想将表单提交到当前的 URI,如下所示:

<form action="${CURRENT_URI}" method="post">
<input type="text" name="email" />
</form>

从 mako 模板中。但我不确定哪个变量保存了当前的 uri 信息。

谢谢。

4

1 回答 1

1

实际上,你不需要它。

<form action="" method="post">
<input type="text" name="email" />
</form>

如果您将操作留空,它将发布到当前 url。

但是,如果您出于其他原因需要当前 url,可以通过调用来检索它pylons.url.current()

于 2010-01-27T04:34:03.497 回答