Merge branch 'LQDJudge:master' into master
This commit is contained in:
commit
49a186f72f
13 changed files with 132 additions and 90 deletions
|
@ -194,7 +194,7 @@ class ProblemSolution(
|
|||
PageVoteDetailView,
|
||||
BookMarkDetailView,
|
||||
):
|
||||
context_object_name = "problem"
|
||||
context_object_name = "solution"
|
||||
template_name = "problem/editorial.html"
|
||||
|
||||
def get_title(self):
|
||||
|
@ -220,7 +220,7 @@ class ProblemSolution(
|
|||
) and not self.request.user.has_perm("judge.see_private_solution"):
|
||||
raise Http404()
|
||||
|
||||
context["solution"] = solution
|
||||
context["problem"] = self.problem
|
||||
context["has_solved_problem"] = self.problem.id in self.get_completed_problems()
|
||||
return context
|
||||
|
||||
|
@ -1118,7 +1118,6 @@ def problem_submit(request, problem, submission=None):
|
|||
|
||||
# Save a query
|
||||
model.source = source
|
||||
cache.set(f"submission_source_file:{model.id}", form.source_file_name, 3600)
|
||||
model.judge(rejudge=False, judge_id=form.cleaned_data["judge"])
|
||||
|
||||
return HttpResponseRedirect(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue