-
Notifications
You must be signed in to change notification settings - Fork 1
/
config_uat.py
39 lines (30 loc) · 1.08 KB
/
config_uat.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
#coding:utf-8
import os
# basedir = os.path.abspath(os.path.dirname(__file__)) # 这行有什么用
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess to string'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
ZHIHU_MAIL_SUBJECT_PREFIX = '[ZHIHU]'
PHONE_API_KEY = os.environ.get('PHONE_API_KEY')
BLOG_ADMIN = '[email protected]' # 填管理员邮箱
BLOG_POSTS_PER_PAGE = 3 #每页文章数
#y邮箱参数
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 25
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
MAIL_SENDER = os.environ.get('MAIL_SENDER') #邮箱发送者
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL')
class ProductionCpnfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
config = {
'production': ProductionCpnfig,
'default': DevelopmentConfig
}