Divided html into templates

This commit is contained in:
2023-12-31 16:59:53 +00:00
parent 54877495f0
commit 2f63b6e89c
5 changed files with 113 additions and 88 deletions

10
app.py
View File

@@ -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)