mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-04 03:22:06 +00:00
整理格式
This commit is contained in:
parent
444cbc4324
commit
376257beed
@ -21,7 +21,6 @@ from .models import Submission
|
||||
from .serializers import CreateSubmissionSerializer, SubmissionSerializer, SubmissionhareSerializer
|
||||
|
||||
|
||||
|
||||
class SubmissionAPIView(APIView):
|
||||
@login_required
|
||||
def post(self, request):
|
||||
@ -81,7 +80,8 @@ def problem_my_submissions_list_page(request, problem_id):
|
||||
except Problem.DoesNotExist:
|
||||
return error_page(request, u"问题不存在")
|
||||
|
||||
submissions = Submission.objects.filter(user_id=request.user.id, problem_id=problem.id, contest_id__isnull=True).order_by("-create_time"). \
|
||||
submissions = Submission.objects.filter(user_id=request.user.id, problem_id=problem.id,
|
||||
contest_id__isnull=True).order_by("-create_time"). \
|
||||
values("id", "result", "create_time", "accepted_answer_time", "language")
|
||||
|
||||
return render(request, "oj/problem/my_submissions_list.html",
|
||||
@ -196,7 +196,7 @@ def my_submission_list_page(request, page=1):
|
||||
return render(request, "oj/submission/my_submissions_list.html",
|
||||
{"submissions": current_page, "page": int(page),
|
||||
"previous_page": previous_page, "next_page": next_page, "start_id": int(page) * 20 - 20,
|
||||
"announcements": announcements, "filter":filter})
|
||||
"announcements": announcements, "filter": filter})
|
||||
|
||||
|
||||
class SubmissionShareAPIView(APIView):
|
||||
@ -212,4 +212,4 @@ class SubmissionShareAPIView(APIView):
|
||||
submission.save()
|
||||
return success_response(submission.shared)
|
||||
else:
|
||||
return serializer_invalid_response(serializer)
|
||||
return serializer_invalid_response(serializer)
|
||||
|
Loading…
Reference in New Issue
Block a user