From 1808426a738075d379430bc6fac80a7c4b85adcc Mon Sep 17 00:00:00 2001 From: "sxw@401" Date: Sun, 13 Sep 2015 11:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug,=E7=BC=A9=E8=BF=9B?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=BC=95=E5=8F=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contest/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contest/views.py b/contest/views.py index 11d22f0f..caf572db 100644 --- a/contest/views.py +++ b/contest/views.py @@ -1,8 +1,6 @@ # coding=utf-8 import json import datetime -from functools import wraps -from django.utils.timezone import now from django.shortcuts import render from django.db import IntegrityError from django.utils import dateparse @@ -414,7 +412,7 @@ def contest_rank_page(request, contest_id): result[i]["total_ac"] = submissions.filter(ac=True).count() result[i]["user"] = User.objects.get(id=result[i]["user_id"]) result[i]["total_time"] = submissions.filter(ac=True).aggregate(total_time=Sum("total_time"))["total_time"] - result = sorted(result, cmp=_cmp, reverse=True) + result = sorted(result, cmp=_cmp, reverse=True) r.set("contest_rank_" + contest_id, json.dumps(list(result))) else: # 从缓存读取排名信息