-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.py
54 lines (42 loc) · 1.47 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# coding: utf-8
import os
# DEBUG = True
# SECRET_KEY = 'smtp.cntaiping.com' # os.urandom(24)
# SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/easyQAsystem?charset=utf8'
# SQLALCHEMY_COMMIT_ON_TEARDOWN = True
# SQLALCHEMY_TRACK_MODIFICATIONS = True
# MAIL_SERVER = 'smtp.*****.com'
# MAIL_PORT = 25
# # MAIL_USE_TLS = True
# MAIL_USERNAME = '******@******.com'
# MAIL_PASSWORD = '******'
#
class Config:
DEBUG = True
SECRET_KEY = 'smtp.cntaiping.com' # os.urandom(24)
#SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/easyQAsystem?charset=utf8'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
MAIL_SERVER = 'smtp.*&****.com'
MAIL_PORT = 25
# MAIL_USE_TLS = True
MAIL_USERNAME = '******@******.com'
MAIL_PASSWORD = '******'
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/easyQAsystem?charset=utf8'
class TestingConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/easyQAsystem?charset=utf8'
class ProductionConfig(Config):
DEBUG = False
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/easyQAsystem?charset=utf8'
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'production': ProductionConfig,
'default': DevelopmentConfig
}