OnlineJudge/oj/local_settings.py

34 lines
863 B
Python
Raw Normal View History

# coding=utf-8
2015-08-02 00:50:38 +00:00
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 下面是需要自己修改的
2015-08-26 06:25:14 +00:00
LOG_PATH = "log/"
2015-08-17 04:48:10 +00:00
# 注意这是web 服务器访问的地址,判题端访问的地址不一定一样,因为可能不在一台机器上
2015-08-02 00:50:38 +00:00
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
2015-08-17 04:48:10 +00:00
},
2015-08-26 06:25:14 +00:00
# submission 的 name 和 engine 请勿修改,其他代码会用到
2015-08-17 04:48:10 +00:00
'submission': {
'NAME': 'oj_submission',
'ENGINE': 'django.db.backends.mysql',
'HOST': "121.42.32.129",
'PORT': 3306,
2015-08-17 04:48:10 +00:00
'USER': 'root',
2015-08-26 06:25:14 +00:00
'PASSWORD': 'mypwd',
'CONN_MAX_AGE': 0.1,
2015-08-02 00:50:38 +00:00
}
}
DEBUG = True
# 同理 这是 web 服务器的上传路径
2015-08-17 04:48:10 +00:00
TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case/')
ALLOWED_HOSTS = []