OnlineJudge/oj/local_settings.py
virusdefender c08ec7a2dc 修改 admin 界面,ip 太宽了
monitor 不再使用,配置判题服务器的代码移入 judge_dispatcher 里面

添加前端后台判题服务器管理页面一些校验的功能

去掉判题服务器监控的前端和后端

修复比赛 first ac 显示错误的问题

修复两步验证中的错误

tfa 显示 url

增加 qrcode 依赖

完成两步验证的逻辑

fix error package name and add pip mirrorwq

废弃 huey,多数据库连接的时候存在 connection 无法释放的问题,回到 celery

修复 huey 队列不会释放数据库连接的问题,是用法不对

增加关闭两步验证的 api

增加两步验证基础代码

完善 sso 登录部分

规范配置文件写法;数据库用户名也在环境变量中取

个人博客链接前面也增加图标

修改判题机器的配置文件

删除不再使用的配置文件

Squash from a1fff74 to 12f96c6 by virusdefender
2015-12-23 00:33:08 +08:00

49 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding=utf-8
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 注意这是web 服务器访问的地址,判题端访问的地址不一定一样,因为可能不在一台机器上
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
},
# submission 的 name 和 engine 请勿修改,其他代码会用到
'submission': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db1.sqlite3'),
}
}
REDIS_CACHE = {
"host": "127.0.0.1",
"port": 6379,
"db": 1
}
REDIS_QUEUE = {
"host": "127.0.0.1",
"port": 6379,
"db": 2
}
# for celery
BROKER_URL = 'redis://%s:%s/%s' % (REDIS_QUEUE["host"], str(REDIS_QUEUE["port"]), str(REDIS_QUEUE["db"]))
ACCEPT_CONTENT = ['json']
DEBUG = True
ALLOWED_HOSTS = []
# 在 debug 关闭的情况下,静态文件不是有 django runserver 来处理的,应该由 nginx 返回
# 在 debug 开启的情况下django 会在下面两个文件夹中寻找对应的静态文件。
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static/src/"), BASE_DIR]
# 模板文件夹
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'template/src/')]
SSO = {"callback": "http://localhost:8765/login"}