Nezobrazuj ve výsledkovce sloupce pro čísla 1 a 2
This commit is contained in:
parent
1a9d862084
commit
d20919cb66
2 changed files with 6 additions and 2 deletions
|
@ -36,7 +36,7 @@
|
||||||
<th class='border-r'>Jméno
|
<th class='border-r'>Jméno
|
||||||
<th class='border-r'>R.
|
<th class='border-r'>R.
|
||||||
<th class='border-r'>Odjakživa
|
<th class='border-r'>Odjakživa
|
||||||
{% for c in rocnik.verejna_cisla %}
|
{% for c in cisla_s_body %}
|
||||||
{% if c.verejna_vysledkovka %}
|
{% if c.verejna_vysledkovka %}
|
||||||
<th class='border-r'><a href="{{ c.verejne_url }}">
|
<th class='border-r'><a href="{{ c.verejne_url }}">
|
||||||
{{c.rocnik.rocnik}}.{{ c.cislo }}</a>
|
{{c.rocnik.rocnik}}.{{ c.cislo }}</a>
|
||||||
|
|
|
@ -138,8 +138,11 @@ class RocnikView(generic.DetailView):
|
||||||
v.body_rocnik = v.body
|
v.body_rocnik = v.body
|
||||||
v.body_cisla = []
|
v.body_cisla = []
|
||||||
|
|
||||||
|
# nezobrazovat výsledky u prvních dvou čísel (jsou nulové)
|
||||||
|
cisla_s_body = [c for c in context['rocnik'].verejna_cisla() if c.cislo not in ['1', '2']]
|
||||||
|
|
||||||
#pokud pro dany rok a cislo nema resitel vysledky, ma defaultne 0
|
#pokud pro dany rok a cislo nema resitel vysledky, ma defaultne 0
|
||||||
for cis in context['rocnik'].verejna_cisla():
|
for cis in cisla_s_body:
|
||||||
if cis.verejna_vysledkovka:
|
if cis.verejna_vysledkovka:
|
||||||
body_za_cislo = VysledkyZaCislo.objects.filter(cislo__rocnik = context['rocnik']).filter(cislo = cis).filter(resitel = v.resitel)
|
body_za_cislo = VysledkyZaCislo.objects.filter(cislo__rocnik = context['rocnik']).filter(cislo = cis).filter(resitel = v.resitel)
|
||||||
#seznam vysledku se spravnym rocnikem a cislem pro resitele
|
#seznam vysledku se spravnym rocnikem a cislem pro resitele
|
||||||
|
@ -157,6 +160,7 @@ class RocnikView(generic.DetailView):
|
||||||
|
|
||||||
context['vysledkovka'] = vysledkovka
|
context['vysledkovka'] = vysledkovka
|
||||||
context['temata_v_rocniku'] = temata_v_rocniku
|
context['temata_v_rocniku'] = temata_v_rocniku
|
||||||
|
context['cisla_s_body'] = cisla_s_body
|
||||||
return context
|
return context
|
||||||
|
|
||||||
class ProblemView(generic.DetailView):
|
class ProblemView(generic.DetailView):
|
||||||
|
|
Loading…
Reference in a new issue