fixup! preparation commit for henni
This commit is contained in:
parent
f7cb273254
commit
9eb4d5ada0
12
config.py
12
config.py
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +33,15 @@ class DevelopmentConfig(Config):
|
||||||
|
|
||||||
|
|
||||||
class TestingConfig(Config):
|
class TestingConfig(Config):
|
||||||
TESTING = True
|
SECURITY_SEND_REGISTER_EMAIL = False
|
||||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data_testing.sqlite')
|
DEBUG = True
|
||||||
|
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:{p}@{h}/pitstops'.format(p=os.environ.get('MYSQL_PASSWORD'),
|
||||||
|
h=os.environ.get('MYSQL_HOST'))
|
||||||
|
|
||||||
|
|
||||||
class ProductionConfig(Config):
|
class ProductionConfig(Config):
|
||||||
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:%s@database/pitstops' % (os.environ.get('DATABASE_ENV_MYSQL_ROOT_PASSWORD'))
|
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:{h}@database/pitstops'.format(
|
||||||
|
h=os.environ.get('DATABASE_ENV_MYSQL_ROOT_PASSWORD'))
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -45,4 +49,4 @@ config = {
|
||||||
'testing': TestingConfig,
|
'testing': TestingConfig,
|
||||||
'production': ProductionConfig,
|
'production': ProductionConfig,
|
||||||
'default': DevelopmentConfig
|
'default': DevelopmentConfig
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue