加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
settings.py 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
shenshuo 提交于 2019-03-21 12:47 . 例行更新
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Contact : 191715030@qq.com
Author : shenshuo
Date : 2019/1/21
Desc : 配置文件
"""
import os
from websdk.consts import const
ROOT_DIR = os.path.dirname(__file__)
debug = True
xsrf_cookies = True
expire_seconds = 365 * 24 * 60 * 60
cookie_secret = '61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2X6TP1o/Vo='
DEFAULT_DB_DBHOST = os.getenv('DEFAULT_DB_DBHOST', '172.16.0.223')
DEFAULT_DB_DBPORT = os.getenv('DEFAULT_DB_DBPORT', '3306')
DEFAULT_DB_DBUSER = os.getenv('DEFAULT_DB_DBUSER', 'root')
DEFAULT_DB_DBPWD = os.getenv('DEFAULT_DB_DBPWD', 'ljXrcyn7chaBU4F')
DEFAULT_DB_DBNAME = os.getenv('DEFAULT_DB_DBNAME', 'codo_kerrigan')
READONLY_DB_DBHOST = os.getenv('READONLY_DB_DBHOST', '172.16.0.223')
READONLY_DB_DBPORT = os.getenv('READONLY_DB_DBPORT', '3306')
READONLY_DB_DBUSER = os.getenv('READONLY_DB_DBUSER', 'root')
READONLY_DB_DBPWD = os.getenv('READONLY_DB_DBPWD', 'ljXrcyn7chaBU4F')
READONLY_DB_DBNAME = os.getenv('READONLY_DB_DBNAME', 'codo_kerrigan')
try:
from local_settings import *
except:
pass
settings = dict(
debug=debug,
xsrf_cookies=xsrf_cookies,
cookie_secret=cookie_secret,
expire_seconds=expire_seconds,
app_name='codo-kerrigan',
databases={
const.DEFAULT_DB_KEY: {
const.DBHOST_KEY: DEFAULT_DB_DBHOST,
const.DBPORT_KEY: DEFAULT_DB_DBPORT,
const.DBUSER_KEY: DEFAULT_DB_DBUSER,
const.DBPWD_KEY: DEFAULT_DB_DBPWD,
const.DBNAME_KEY: DEFAULT_DB_DBNAME,
},
const.READONLY_DB_KEY: {
const.DBHOST_KEY: READONLY_DB_DBHOST,
const.DBPORT_KEY: READONLY_DB_DBPORT,
const.DBUSER_KEY: READONLY_DB_DBUSER,
const.DBPWD_KEY: READONLY_DB_DBPWD,
const.DBNAME_KEY: READONLY_DB_DBNAME,
}
}
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化