-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
executable file
·38 lines (29 loc) · 1002 Bytes
/
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
import os
class Config():
SECRET_KEY = os.environ.get('FLASK_SECRET_KEY', 'f&k*n@kfa_H*tf^$)')
SSL_DISABLE = False
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_RECORD_QUERIES = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
FLASKY_SLOW_DB_QUERY_TIME = 0.5
FLASKY_PER_PAGE = 10
CKEDITOR_SERVE_LOCAL = True
CKEDITOR_HEIGHT = 400
CKEDITOR_ENABLE_CODESNIPPET = True
CKEDITOR_FILE_UPLOADER = 'main.upload'
@staticmethod
def init__app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = ('mysql+pymysql://root:123456@localhost:3306'
'/flask_dev?charset=utf8mb4')
class ProductionConfig(Config):
DEBUG = False
SQLALCHEMY_DATABASE_URI = ('mysql+pymysql://root:123456@localhost:3306'
'/flask_pro?charset=utf8mb4')
config = {
'default': ProductionConfig,
'development': DevelopmentConfig,
'production': ProductionConfig
}