Created
November 3, 2015 22:08
-
-
Save IuryAlves/31ac99e6ee064571a371 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# coding: utf-8 | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
@app.route("/send", methods=["POST"]) | |
def send(): | |
return request.form["data"] | |
@app.route("/") | |
def index(): | |
# o arquivo form.html deve estar dentro da pasta templates | |
return render_template("form.html") | |
if __name__ == '__main__': | |
app.run() |
This file contains hidden or 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
<html> | |
<head> | |
</head> | |
<body> | |
<form method="POST" action="/send"> | |
<input name="data"> | |
<input type="submit" value="data"/> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment