Last active
March 12, 2017 12:24
-
-
Save Swalloow/983d1b2509a47c8267a69e1c37434244 to your computer and use it in GitHub Desktop.
Flask-WTF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 버튼이나 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