-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_web.py
75 lines (56 loc) · 1.87 KB
/
config_web.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# coding=utf-8
__author__ = '[email protected]'
import os
basedir = os.path.abspath(os.path.dirname(__file__))
SITE_NAME = 'Weixin-Robot'
TEST = 'production'
USER_LOG_PATH = '/var/log/user-log/user_log.log'
UPLOAD_FOLDER = basedir + '/tmp/'
ALLOWED_IMG_EXTENSIONS = ['png','jpg','jpeg','gif','PNG','JPG','JPEG','GIF','bmp','BMP']
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
#
# if os.environ.get('DATABASE_URL') is None:
# SQLALCHEMY_DATABASE_URI = ('sqlite:///' + os.path.join(basedir, 'app.db') +
# '?check_same_thread=False')
# else:
# SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
# SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# SQLALCHEMY_RECORD_QUERIES = True
# WHOOSH_BASE = os.path.join(basedir, 'search.db')
DATABASE_QUERY_TIMEOUT = 0.5
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'migrations')
SQLALCHEMY_DATABASE_URI = 'mysql://[username]:[password]@[ip]:3306/weixin_robot'
SQLALCHEMY_RECORD_QUERIES = True
# available languages
LANGUAGES = {
'en': 'English',
'es': 'Español'
}
# microsoft translation service
MS_TRANSLATOR_CLIENT_ID = '' # enter your MS translator app id here
MS_TRANSLATOR_CLIENT_SECRET = '' # enter your MS translator app secret here
# pagination
POSTS_PER_PAGE = 50
MAX_SEARCH_RESULTS = 50
LANGUAGES = {
'en': 'English',
'es': 'Español'
}
AIML_SET = os.path.join(os.path.dirname(__file__),'app/aiml_set')
DEBUG = False
BOT_PROPERTIES = {
"name":"@xdtuxbot",
"master":"silence",
"birthday":"地球时间2017年5月10日",
"orgnization":"计算机工程系",
"univercity":"太原工业学院",
"gender":"男生",
"city":"太原",
"os":"Linux",
}
#tuling机器人api key
TULING_API_KEY = '[tuling机器人api]'
WEI_XIN_TOKEN= '[weixin_token]'
WEI_XIN_APP_ID = '[weixin_app_id]'
WEI_XIN_APP_SECRET = '[weixin_app_id_secret]'