We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f219c90 commit b7dfb93Copy full SHA for b7dfb93
app/__init__.py
@@ -10,21 +10,11 @@
10
from flask import Flask
11
from flask_sqlalchemy import SQLAlchemy
12
13
-# Grabs the folder where the script runs.
14
-basedir = os.path.abspath(os.path.dirname(__file__))
15
-
16
# Inject Flask magic
17
app = Flask(__name__)
18
19
-# App Config - the minimal footprint
20
-app.config['TESTING'] = True
21
22
-# Set up the App SECRET_KEY
23
-SECRET_KEY = 'S_U_perS3crEt_KEY#9999'
24
25
-# SQLAlchemy Settings
26
-app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')
27
-app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
+# Load configuration
+app.config.from_object('app.config.Config')
28
29
# Construct the DB Object (SQLAlchemy interface)
30
db = SQLAlchemy (app)
0 commit comments