From 3121d0a0c7dd62bcfdb07350cc8ec929276f35f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nut=CC=A6iu?= Date: Thu, 13 Apr 2017 22:40:41 +0300 Subject: [PATCH] Updating config --- src/config.lock.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/config.lock.py b/src/config.lock.py index 1b4b487..7f5025d 100644 --- a/src/config.lock.py +++ b/src/config.lock.py @@ -16,6 +16,8 @@ along with scoreboard-benchmark . If not, see . """ import os +from src.models import db + basedir = os.path.abspath(os.path.dirname(__file__)) class Config: @@ -30,8 +32,16 @@ class Config: class DevelopmentConfig(Config): SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'database.sqlite') + @staticmethod + def init_app(app): + with app.app_context(): + print("Creating a fresh database") + db.drop_all() + db.create_all() + class ProductionConfig(Config): + BOOTSTRAP_USE_MINIFIED = True pass