mirror of
https://github.com/aronwk-aaron/MSState-Library-ETD.git
synced 2026-01-25 23:08:25 -06:00
40 lines
768 B
Plaintext
40 lines
768 B
Plaintext
import os
|
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
class Config(object):
|
|
DEBUG = False
|
|
TESTING = False
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
|
|
if os.environ.get('SECRET_KEY'):
|
|
SECRET_KEY = os.environ.get('SECRET_KEY')
|
|
else:
|
|
SECRET_KEY = 'SECRET_KEY_NOT_SET'
|
|
|
|
if os.environ.get('SQLALCHEMY_DATABASE_URI'):
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI')
|
|
|
|
|
|
class DevelopmentConfig(Config):
|
|
DEBUG = True
|
|
ASSETS_DEBUG = True
|
|
SQLALCHEMY_ECHO = True
|
|
|
|
|
|
class ProductionConfig(Config):
|
|
pass
|
|
|
|
|
|
class TestingConfig(Config):
|
|
TESTING = True
|
|
|
|
|
|
configs = {
|
|
'dev': DevelopmentConfig,
|
|
'prod': ProductionConfig,
|
|
'test': TestingConfig,
|
|
'default': DevelopmentConfig
|
|
}
|