修改判题设置;增加web 和 mongodb 数据库的操作
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
# coding=utf-8
|
||||
import os
|
||||
|
||||
LOG_PATH = "LOG/"
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# 下面是需要自己修改的
|
||||
LOG_PATH = "LOG/"
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
'CONN_MAX_AGE': 1,
|
||||
'CONN_MAX_AGE': 0.3,
|
||||
},
|
||||
'mongodb': {
|
||||
'HOST': '127.0.0.1',
|
||||
'USERNAME': 'root',
|
||||
'PASSWORD': 'root',
|
||||
'PORT': 27017
|
||||
}
|
||||
}
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
DEBUG = True
|
||||
|
||||
TEST_CASE_DIR = "/var/test_case/"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ from admin.views import AdminTemplateView
|
||||
|
||||
from problem.views import ProblemAdminAPIView
|
||||
from problem.views import TestCaseUploadAPIView, ProblemTagAdminAPIView
|
||||
from submission.views import SubmissionnAPIView
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
@@ -50,5 +51,6 @@ urlpatterns = [
|
||||
url(r'^my_solution/(?P<solution_id>\d+)/$', "problem.views.my_solution", name="my_solution_page"),
|
||||
|
||||
url(r'^api/admin/join_group_request/$', JoinGroupRequestAdminAPIView.as_view(), name="join_group_request_admin_api"),
|
||||
url(r'^api/submission/$', SubmissionnAPIView.as_view(), name="submission_api"),
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user