class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.qq.com')
MAIL_PORT = int(os.environ.get('MAIL_PORT', '587'))
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS', 'true').lower() in \
['true', 'on', '1']
MAIL_USERNAME = os.environ.get('MAIL_USERNAME', '591867837@qq.com')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD', 'xxibvizgihlmbcgb')
FLASKY_MAIL_SUBJECT_PREFIX = '[Mhc]'
FLASKY_MAIL_SENDER = 'Blog Admin <591867837@qq.com>'
FLASKY_ADMIN = os.environ.get('FLASKY_ADMIN', '591867837@qq.com')
SQLALCHEMY_TRACK_MODIFICATIONS = False

@staticmethod
def init_app(app):
pass


class DevelopmentConfig(Config):
DEBUG = True
os.environ['DEV_DATABASE_URL'] = 'mysql://root:root.123@127.0.0.1/test1'
SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')