33 lines
854 B
Python
33 lines
854 B
Python
class BaseConfig:
|
|
"""Base configuration"""
|
|
DEBUG = False
|
|
TESTING = False
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
BCRYPT_LOG_ROUNDS = 13
|
|
TOKEN_EXPIRATION_DAYS = 30
|
|
TOKEN_EXPIRATION_SECONDS = 0
|
|
|
|
|
|
class DevelopmentConfig(BaseConfig):
|
|
"""Development configuration"""
|
|
DEBUG = True
|
|
SQLALCHEMY_DATABASE_URI = \
|
|
'mysql+mysqldb://mpwo:mpwo@127.0.0.1:3306/mpwo'
|
|
SECRET_KEY = 'development key'
|
|
USERNAME = 'admin'
|
|
PASSWORD = 'default'
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
|
|
|
|
class TestingConfig(BaseConfig):
|
|
"""Development configuration"""
|
|
DEBUG = True
|
|
SQLALCHEMY_DATABASE_URI = \
|
|
'mysql+mysqldb://mpwo:mpwo@127.0.0.1:3306/mpwo_test'
|
|
SECRET_KEY = 'test key'
|
|
USERNAME = 'admin'
|
|
PASSWORD = 'default'
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
TOKEN_EXPIRATION_DAYS = 0
|
|
TOKEN_EXPIRATION_SECONDS = 3
|