-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
30 lines (19 loc) · 608 Bytes
/
Copy pathapp.py
File metadata and controls
30 lines (19 loc) · 608 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
from flask import Flask, render_template
from db import db
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///data.db"
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config["SECRET_KEY"] = "your_secret_key"
db.init_app(app)
@app.route("/about")
def about():
return render_template("about.html")
@app.route("/guide/how-to-review")
def howto_review():
return render_template("howto_review.html")
from blueprints.routes import bp
app.register_blueprint(bp)
if __name__ == "__main__":
with app.app_context():
db.create_all()
app.run(debug=True)