From 23dde1263a28db51e0e5a12be382e4cc46f3b93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 14 Nov 2022 23:32:33 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Petr=20chce=20ob=C3=A1lkovat=20od=20?= =?UTF-8?q?=C4=8D=C3=ADsla=20do=20=C4=8D=C3=ADsla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/odmeny.html | 20 ++++---------------- seminar/views/views_all.py | 17 +++++------------ 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/seminar/templates/seminar/archiv/odmeny.html b/seminar/templates/seminar/archiv/odmeny.html index aa5ffb7f..6b2d1eb7 100644 --- a/seminar/templates/seminar/archiv/odmeny.html +++ b/seminar/templates/seminar/archiv/odmeny.html @@ -7,23 +7,11 @@ {% endblock %} -

Od prvního deadlinu {{ from_cislo }} do prvního deadlinu {{ to_cislo }}

+

Od čísla {{ from_cislo }} do čísla {{ to_cislo }}

+ (Od „{{ from_deadline }}“ (vyjma) do „{{ to_deadline }}“ (včetně))
+
Posílat použe po opravení všeho v čísle {{ to_cislo }}!
- -

Od {{ from_cislo }} do prvního deadlinu {{ to_cislo }} (pro první číslo)

- - -

Od prvního deadlinu {{ from_cislo }} do {{ to_cislo }} (pro poslední číslo)

- diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 7cf79d9f..424804b1 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -484,18 +484,11 @@ class OdmenyView(generic.TemplateView): context["from_cislo"] = fromcislo context["to_cislo"] = tocislo - context["zmeny_prvni_prvni"] = get_diff( - fromcislo.zlomovy_deadline_pro_papirove_cislo(), - tocislo.zlomovy_deadline_pro_papirove_cislo() - ) - context["zmeny_prvni_posledni"] = get_diff( - fromcislo.zlomovy_deadline_pro_papirove_cislo(), - posledni_deadline_oprava(tocislo) - ) - context["zmeny_posledni_prvni"] = get_diff( - posledni_deadline_oprava(fromcislo), - tocislo.zlomovy_deadline_pro_papirove_cislo() - ) + from_deadline = posledni_deadline_oprava(fromcislo) + to_deadline = posledni_deadline_oprava(tocislo) + context["from_deadline"] = from_deadline + context["to_deadline"] = to_deadline + context["zmeny"] = get_diff(from_deadline, to_deadline) return context -- 2.39.5