aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/__init__.py')
-rw-r--r--python/Dawn/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/Dawn/__init__.py b/python/Dawn/__init__.py
index 1029d764..a88b0301 100644
--- a/python/Dawn/__init__.py
+++ b/python/Dawn/__init__.py
@@ -1,10 +1,12 @@
from flask import Flask
import logging
+from flask_sqlalchemy import SQLAlchemy
+from sqlalchemy import MetaData
app = Flask(__name__)
app.config.from_envvar('CONF')
-from Dawn.models import db
-db.init_app(app)
+db = SQLAlchemy(app, metadata = MetaData(schema=app.config['SCHEMA']))
+
if not app.debug:
fh = logging.FileHandler(filename=app.config['LOGFILE'])
fh.setLevel(logging.INFO)