-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
20 lines (19 loc) · 874 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
import os
basedir=os.path.abspath(os.path.dirname(__file__)) #获得当前文件(比如配置文件)所在的路径
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
MAIL_SERVER=os.environ.get('MAIL_SERVER')
MAIL_PORT=int(os.environ.get('MAIL_PORT') or 25)
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS')
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
ADMINS=['[email protected]']
POSTS_PER_PAGE=3
COMMENTS_PER_PAGE=5
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
LANGUAGES=['en','es','zh_CN']
MS_TRANSLATOR_KEY=os.environ.get('MS_TRANSLATOR_KEY')
LOG_TO_STDOUT=os.environ.get('LOG_TO_STDOUT')