Skip to content

Instantly share code, notes, and snippets.

@Swalloow
Last active March 12, 2017 12:24
Show Gist options
  • Save Swalloow/983d1b2509a47c8267a69e1c37434244 to your computer and use it in GitHub Desktop.
Save Swalloow/983d1b2509a47c8267a69e1c37434244 to your computer and use it in GitHub Desktop.
Flask-WTF
<!-- 버튼이나 input을 제출하면 주식이 팔린다! -->
<form action='/stock/sell' method='get'>
<input type=submit value=sell_stock>
</form>
<a href="/stock/sell/"> click me!</a>
<form action='/stock/sell' method='post'>
<input type=submit value=sell_stock>
</form>
<!-- 플라스크에서는 `Flask-WTF` 패키지를 통해 입력 폼을 검증하고 CSRF를 방지가능 -->
<form method="POST" action="/">
{{ form.csrf_token }}
{{ form.name.label }} {{ form.name(size=20) }}
<input type="submit" value="Go">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment