From 6efc21a62bcbadc16825a5ea5b359f36ad7278b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Koci=C3=A1n?= Date: Fri, 11 Sep 2015 19:35:54 +0200 Subject: [PATCH] =?UTF-8?q?Drobn=C3=A9=20zm=C4=9Bny=20v=C3=BDsledkovky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/cislo.html | 2 +- seminar/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index b20346fc..55f06ca0 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -36,7 +36,7 @@ # Jméno {% for p in problemy %} - {{ p.cislo_zadani.cislo }}.{{ p.kod }} + {{ p.kod_v_rocniku }} {% endfor %} Za číslo Za ročník diff --git a/seminar/views.py b/seminar/views.py index 8ca58936..e8f5917b 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -194,7 +194,7 @@ class CisloView(generic.DetailView): resene_problemy = Problem.objects.filter(cislo_reseni=context['cislo']).filter(typ__in=typy_skutecne_zadanych).order_by('cislo_reseni__cislo', 'kod') - problemy = sorted(list(set([r.problem for r in reseni])), key=lambda x:(0 if x.typ==Problem.TYP_ULOHA else 1,x.kod)) + problemy = sorted(list(set([r.problem for r in reseni])), key=lambda x:(0 if x.typ==Problem.TYP_ULOHA else 1, x.kod_v_rocniku)) #setridi problemy podle typu a poradi zadani problem_index = {} for i in range(len(problemy)):