Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- from flask import Flask,render_template, request
- app = Flask(__name__)
- @app.route("/",methods=['POST','GET'])
- def get_formulario():
- if request.method == "POST":
- if request.form['submit'] == "Enviar":
- txt = request.form['text'].encode('ascii','ignore')
- print "*" * 50
- print "**\t\t Submit text -> ",txt,"\t"+("*" * 2)
- print "*" * 50
- return render_template("index.html")
- if __name__ == "__main__":
- app.run(host="0.0.0.0",port=80,debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement