secret key update

now requires SECRET_KEY to be defined in app config file
This commit is contained in:
2026-03-28 22:02:59 +00:00
parent 96e929c54e
commit 88a8705e13

View File

@@ -6,15 +6,11 @@ from flask import Flask
def create_app(test_config=None): def create_app(test_config=None):
# create and configure the app # create and configure the app
app = Flask(__name__, instance_relative_config=True) app = Flask(__name__, instance_relative_config=True)
app.config.from_mapping( app.config.from_pyfile('config.py')
SECRET_KEY='dev', app.config.from_mapping(DATABASE=os.path.join(app.instance_path, 'database.sqlite'),)
DATABASE=os.path.join(app.instance_path, 'database.sqlite'),
)
# ensure the instance folder exists # ensure the instance folder exists
os.makedirs(app.instance_path, exist_ok=True) os.makedirs(app.instance_path, exist_ok=True)
app.config.from_pyfile('config.py')
from . import db from . import db
db.init_app(app) db.init_app(app)