Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のように、現在の URI にフォームを送信したいと思います。
<form action="${CURRENT_URI}" method="post"> <input type="text" name="email" /> </form>
mako テンプレート内から。しかし、どの変数が現在の uri 情報を保持しているかはわかりません。
ありがとう。
実際には、必要ありません。
<form action="" method="post"> <input type="text" name="email" /> </form>
アクションを空のままにすると、現在の URL に投稿されます。
ただし、他の理由で現在の URL が必要な場合は、次の呼び出しで取得できます。pylons.url.current()
pylons.url.current()