Divided html into templates
This commit is contained in:
10
app.py
10
app.py
@@ -1,4 +1,5 @@
|
||||
from flask import Flask, render_template
|
||||
from os import environ
|
||||
from web import blueprint
|
||||
'''
|
||||
Main entrypoint for Flask application.
|
||||
@@ -8,6 +9,15 @@ from web import blueprint
|
||||
def main():
|
||||
app = Flask(__name__)
|
||||
|
||||
# Set app secret key to sign session cookies
|
||||
secret_key = environ.get("APPSECRET")
|
||||
if secret_key == None:
|
||||
# NO Secret Key set!
|
||||
print("No app secret set, please set one before deploying in production")
|
||||
app.secret_key = "DEFUALTKEY"
|
||||
else:
|
||||
app.secret_key = secret_key
|
||||
|
||||
# Register a blueprint
|
||||
app.register_blueprint(blueprint)
|
||||
app.run(debug=True)
|
||||
|
||||
Reference in New Issue
Block a user