updating config.py
This commit is contained in:
parent
e20b68b039
commit
6ad5f72120
1 changed files with 7 additions and 2 deletions
|
@ -35,7 +35,6 @@ class DevelopmentConfig(Config):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_app(app):
|
def init_app(app):
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
print("Creating a fresh database")
|
|
||||||
db.drop_all()
|
db.drop_all()
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
||||||
|
@ -46,7 +45,13 @@ class ProductionConfig(Config):
|
||||||
|
|
||||||
|
|
||||||
class TestingConfig(Config):
|
class TestingConfig(Config):
|
||||||
pass
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'database.sqlite')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def init_app(app):
|
||||||
|
with app.app_context():
|
||||||
|
db.drop_all()
|
||||||
|
db.create_all()
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
'development': DevelopmentConfig,
|
'development': DevelopmentConfig,
|
||||||
|
|
Loading…
Reference in a new issue