2019-07-03 08:31:23 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
2019-07-05 12:47:35 +00:00
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
|
2019-07-03 08:31:23 +00:00
|
|
|
class Config:
|
|
|
|
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
|
2019-07-05 12:47:35 +00:00
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
2019-07-03 13:40:09 +00:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def init_app(app):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class DevelopmentConfig(Config):
|
|
|
|
DEBUG = True
|
2019-07-05 12:47:35 +00:00
|
|
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data_dev.sqlite')
|
2019-07-03 13:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
# class TestingConfig(Config):
|
|
|
|
|
|
|
|
|
|
|
|
# class ProductionConfig(Config):
|
|
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
'development': DevelopmentConfig,
|
|
|
|
# 'testing': TestingConfig,
|
|
|
|
# 'production': ProductionConfig,
|
|
|
|
|
|
|
|
'default': DevelopmentConfig
|
|
|
|
}
|