diff --git a/oj/local_settings.py b/oj/local_settings.py index 2d84f67..3c87b06 100644 --- a/oj/local_settings.py +++ b/oj/local_settings.py @@ -27,4 +27,4 @@ MONGODB = { DEBUG = True # 同理 这是 web 服务器的上传路径 -TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case') +TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case/') diff --git a/static/src/js/app/admin/problem/add_problem.js b/static/src/js/app/admin/problem/add_problem.js index 40f74da..4996f85 100644 --- a/static/src/js/app/admin/problem/add_problem.js +++ b/static/src/js/app/admin/problem/add_problem.js @@ -18,7 +18,7 @@ require(["jquery", "avalon", "editor", "uploader", "bsAlert", "csrfToken", "tagE } } }, - cpu: { + timeLimit: { validators: { notEmpty: { message: "请输入时间限制" @@ -34,7 +34,7 @@ require(["jquery", "avalon", "editor", "uploader", "bsAlert", "csrfToken", "tagE } } }, - memory: { + memoryLimit: { validators: { notEmpty: { message: "请输入内存限制" @@ -156,8 +156,8 @@ require(["jquery", "avalon", "editor", "uploader", "bsAlert", "csrfToken", "tagE $id: "addProblem", title: "", description: "", - cpu: 1000, - memory: 256, + timeLimit: 1000, + memoryLimit: 256, samples: [{input: "", output: "", "visible": true}], hint: "", visible: true, @@ -215,4 +215,4 @@ require(["jquery", "avalon", "editor", "uploader", "bsAlert", "csrfToken", "tagE }); }); avalon.scan(); - }); \ No newline at end of file + }); diff --git a/template/admin/problem/add_problem.html b/template/admin/problem/add_problem.html index 67e79cf..63132ca 100644 --- a/template/admin/problem/add_problem.html +++ b/template/admin/problem/add_problem.html @@ -15,12 +15,12 @@