-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
33 lines (20 loc) · 646 Bytes
/
app.py
File metadata and controls
33 lines (20 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from flask import Flask, render_template, request, redirect, jsonify
from wtforms import Form, HiddenField
app = Flask(__name__)
class TestForm(Form):
logoname = HiddenField("logoname")
@app.route("/")
def welcome():
return render_template("welcome.html")
@app.route("/tutorial")
def tutorial():
return render_template("decision.html")
@app.route("/home")
def home():
return render_template("home.html",msg="")
@app.route("/home" ,methods=['POST'])
def backTohome():
form = TestForm(request.values)
return render_template("home.html",msg=form.logoname.data)
if __name__ == "__main__":
app.run(debug=True)