-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
48 lines (39 loc) · 1.23 KB
/
app.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
from flask import *
from api.attractions import attractions
from api.user import user
from api.user import user_auth
from api.booking import booking
from api.orders import orders
from api.orders import order_num
from api.member import member
# from api.thankyou import thankyou
app=Flask(__name__)
app.config["JSON_AS_ASCII"]=False
app.config["TEMPLATES_AUTO_RELOAD"]=True
# attractions route setting
app.register_blueprint(attractions, url_prefix="/api")
app.register_blueprint(user, url_prefix="/api")
app.register_blueprint(user_auth, url_prefix="/api")
app.register_blueprint(booking, url_prefix="/api")
app.register_blueprint(orders, url_prefix="/api")
app.register_blueprint(order_num, url_prefix="/api")
app.register_blueprint(member, url_prefix="/api")
# app.register_blueprint(thankyou)
# Pages
@app.route("/")
def index():
return render_template("index.html")
@app.route("/attraction/<id>")
def attraction(id):
return render_template("attraction.html")
@app.route("/booking")
def booking():
return render_template("booking.html")
@app.route("/thankyou")
def thankyou():
return render_template("thankyou.html")
@app.route("/member")
def member():
return render_template("member.html")
# app.run(host="0.0.0.0", port=3000)
app.run(port=3000)