2015-06-26 07:59:53 +00:00
|
|
|
# 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-12 06:01:34 +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-12 06:01:34 +00:00
|
|
|
'CONN_MAX_AGE': 0.3,
|
2015-08-17 04:48:10 +00:00
|
|
|
},
|
|
|
|
'submission': {
|
|
|
|
'NAME': 'oj_submission',
|
|
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
|
|
'HOST': "121.42.32.129",
|
|
|
|
'POST': 3306,
|
|
|
|
'USER': 'root',
|
|
|
|
'PASSWORD': 'mypwd'
|
2015-08-02 00:50:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-12 06:01:34 +00:00
|
|
|
DEBUG = True
|
|
|
|
|
2015-08-12 11:55:41 +00:00
|
|
|
# 同理 这是 web 服务器的上传路径
|
2015-08-17 04:48:10 +00:00
|
|
|
TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case/')
|
|
|
|
|
|
|
|
DATABASE_ROUTERS = ['oj.db_router.DBRouter']
|
2015-08-17 05:01:43 +00:00
|
|
|
|