From b13f487d530a761cf5a9399b4dda126f9d67c378 Mon Sep 17 00:00:00 2001 From: esp Date: Sat, 5 Sep 2015 22:04:40 +0800 Subject: [PATCH 01/38] update views.py --- contest/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contest/views.py b/contest/views.py index eaef55b..58fcf5d 100644 --- a/contest/views.py +++ b/contest/views.py @@ -357,7 +357,7 @@ def contest_list_page(request, page=1): # 筛选我能参加的比赛 join = request.GET.get("join", None) - if join: + if join and request.user.id: contests = contests.filter(Q(contest_type__in=[1, 2]) | Q(groups__in=request.user.group_set.all())). \ filter(end_time__gt=datetime.datetime.now(), start_time__lt=datetime.datetime.now()) From 51601c34d876c46f5211acbfe49478e0e5f7eba6 Mon Sep 17 00:00:00 2001 From: esp Date: Sat, 5 Sep 2015 22:15:34 +0800 Subject: [PATCH 02/38] =?UTF-8?q?update=20contest=5Flist.html=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9C=AA=E7=99=BB=E5=BD=95=E6=97=B6=E5=B0=B1=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=AF=B9=E5=8F=AF=E4=BB=A5=E5=8F=82=E5=8A=A0=E7=9A=84?= =?UTF-8?q?=E6=AF=94=E8=B5=9B=E7=9A=84=E7=AD=9B=E9=80=89=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E8=BF=99=E6=B2=A1=E6=9C=89=E6=84=8F=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/src/oj/contest/contest_list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/src/oj/contest/contest_list.html b/template/src/oj/contest/contest_list.html index 25b8eae..51e522d 100644 --- a/template/src/oj/contest/contest_list.html +++ b/template/src/oj/contest/contest_list.html @@ -48,12 +48,13 @@ {% endfor %} - + {% if request.user.is_authenticated %}
+ {% endif %} -{% endblock %} -{% extends 'oj_base.html' %} - -{% block body %} - - {% load submission %} - {% load user %} -
-
- -
- - - - - - - - - - - - - {% if submissions %} - - {% for item in submissions %} - - - - - - - - - - {% endfor %} - - {% else %} -

本场比赛还没有提交记录!

- {% endif %} -
#用户提交时间结果运行时间语言
- {{ forloop.counter |add:start_id }}{{ item.user_id|get_username }}{{ item.create_time }}{{ item.result|translate_result }} - {% if item.accepted_answer_time %} - {{ item.accepted_answer_time }}ms - {% else %} - -- - {% endif %} - - {{ item.language|translate_language }} -
- -
-{% endblock %} +{% endblock %} \ No newline at end of file From 4be960093941a1b707dc7c9b0e3dab27aacd2f0b Mon Sep 17 00:00:00 2001 From: "sxw@401" Date: Tue, 8 Sep 2015 11:42:20 +0800 Subject: [PATCH 25/38] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=89=8D=E5=8F=B0?= =?UTF-8?q?=E6=AF=94=E8=B5=9B=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=8F=AF=E8=A7=81=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/src/oj/contest/submissions_list_admin.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/template/src/oj/contest/submissions_list_admin.html b/template/src/oj/contest/submissions_list_admin.html index 5f1b719..8f1660b 100644 --- a/template/src/oj/contest/submissions_list_admin.html +++ b/template/src/oj/contest/submissions_list_admin.html @@ -68,12 +68,8 @@ {% for item in submissions %} - {% ifequal item.user_id request.user.id %} - + {{ forloop.counter |add:start_id }} - {% else %} - {{ forloop.counter |add:start_id }} - {% endifequal %} {{ item.title }} From 254427ef7c6101452afc2bcc47f1b264be1ae550 Mon Sep 17 00:00:00 2001 From: "sxw@401" Date: Tue, 8 Sep 2015 18:52:13 +0800 Subject: [PATCH 26/38] =?UTF-8?q?[=E5=90=8E=E5=8F=B0-=E5=89=8D=E7=AB=AF]?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=86=E6=AF=94=E8=B5=9B=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=BC=80=E6=94=BE=E6=8E=92=E5=90=8D=E9=80=89?= =?UTF-8?q?=20=E9=A1=B9,=E5=A4=A9=E5=8A=A0=E5=B0=81=E6=A6=9C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=AD=97=E6=AE=B5[CI=20SKIP]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/src/admin/contest/add_contest.html | 28 ++++++++------------ template/src/admin/contest/contest_list.html | 19 +++++-------- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/template/src/admin/contest/add_contest.html b/template/src/admin/contest/add_contest.html index b374ec8..4dd8c96 100644 --- a/template/src/admin/contest/add_contest.html +++ b/template/src/admin/contest/add_contest.html @@ -57,36 +57,30 @@
{{el.name}}
-
+
+ +
+
-
- -
-
+
-
+
+ +
+
+
-
-
-
- -
-
-
+