-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.py
37 lines (29 loc) · 967 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
# coding=utf-8
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or '!@#$%^&*12345678'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
JSON_AS_ASCII = False
SQLALCHEMY_RECORD_QUERIES = True
FLASKY_DB_QUERY_TIMEOUT = 0.5
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql://root:1234@localhost:3306/weblog'
# 邮件系统配置
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
FLASKY_MAIL_SENDER = "Weblog Admin <[email protected]>"
FLASKY_ADMIN = os.environ.get('FLASKY_ADMIN') or '[email protected]'
FLASKY_MAIL_SUBJECT_PREFIX = '[Weblog]'
@staticmethod
def init_blog(blog):
pass
class DevelopmentConfig(Config):
pass
config = {
'development': DevelopmentConfig,
}