From e9b52791dd737d25c9f846b7751d5b3095c725e0 Mon Sep 17 00:00:00 2001 From: jokajak Date: Sun, 24 Apr 2016 12:20:03 -0400 Subject: [PATCH] Fix config to pass in variables properly --- backend/flask/src/config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/flask/src/config.py b/backend/flask/src/config.py index a32c6f7..c3fff6b 100644 --- a/backend/flask/src/config.py +++ b/backend/flask/src/config.py @@ -3,16 +3,13 @@ import os basedir = os.path.abspath(os.path.dirname(__file__)) -CSRF_ENABLED = True - - if os.environ.get('DATABASE_URL') is None: SQLALCHEMY_DATABASE_URI = ('sqlite:///' + os.path.join(basedir, 'app.db') + '?check_same_thread=False') else: SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') -SQLALCHEMY_RECRD_QUERIES = True +SQLALCHEMY_RECORD_QUERIES = True ADMINS = ['you@example.com'] @@ -20,15 +17,20 @@ ADMINS = ['you@example.com'] class Config(object): DEBUG = False TESTING = False - SQLALCHEMY_ECHO = False + CSRF_ENABLED = True WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' sessionTimeout = datetime.timedelta(minutes=-2) + SQLALCHEMY_ECHO = False + SQLALCHEMY_DATABASE_URI = SQLALCHEMY_DATABASE_URI + SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') + class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_ECHO = True + SQLALCHEMY_RECORD_QUERIES = True class TestingConfig(Config):