secret key update
now requires SECRET_KEY to be defined in app config file
This commit is contained in:
@@ -6,15 +6,11 @@ from flask import Flask
|
||||
def create_app(test_config=None):
|
||||
# create and configure the app
|
||||
app = Flask(__name__, instance_relative_config=True)
|
||||
app.config.from_mapping(
|
||||
SECRET_KEY='dev',
|
||||
DATABASE=os.path.join(app.instance_path, 'database.sqlite'),
|
||||
)
|
||||
app.config.from_pyfile('config.py')
|
||||
app.config.from_mapping(DATABASE=os.path.join(app.instance_path, 'database.sqlite'),)
|
||||
|
||||
# ensure the instance folder exists
|
||||
os.makedirs(app.instance_path, exist_ok=True)
|
||||
|
||||
app.config.from_pyfile('config.py')
|
||||
|
||||
from . import db
|
||||
db.init_app(app)
|
||||
|
||||
Reference in New Issue
Block a user