From 982048e16acf7b70be8e5f96652c4369510b07b3 Mon Sep 17 00:00:00 2001 From: thanhluong Date: Sat, 2 May 2020 18:43:50 +0000 Subject: [PATCH] Show problem code in the problem list --- judge/admin/problem.py | 2 +- templates/problem/list.html | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/judge/admin/problem.py b/judge/admin/problem.py index 4d29b6a..164caa1 100644 --- a/judge/admin/problem.py +++ b/judge/admin/problem.py @@ -228,7 +228,7 @@ class ProblemAdmin(VersionAdmin): return form def save_model(self, request, obj, form, change): - super(ProblemAdmin, self).save_model(request, obj, form, change) + super().save_model(request, obj, form, change) if form.changed_data and any(f in form.changed_data for f in ('is_public', 'points', 'partial')): self._rescore(request, obj.id) diff --git a/templates/problem/list.html b/templates/problem/list.html index 0a8e1ac..115a818 100644 --- a/templates/problem/list.html +++ b/templates/problem/list.html @@ -204,6 +204,9 @@ {% endif %} {{ _('Problem') }} + + Problem code + {{ _('Category') }} {% if show_types %} {{ _('Types') }} @@ -220,6 +223,11 @@ {{ _('Problem') }}{{ sort_order.name }} + + + Problem code + + {{ _('Category') }}{{ sort_order.group }} @@ -277,6 +285,11 @@ {{ problem.i18n_name }} + + + {{ problem.code }} + + {{ problem.group.full_name }} {% if show_types %}