Merge branch 'vysl'

This commit is contained in:
Matěj Kocián 2015-09-11 19:50:47 +02:00
commit c3fa39c0a5
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@
<th class='border-r'># <th class='border-r'>#
<th class='border-r'>Jméno <th class='border-r'>Jméno
{% for p in problemy %} {% for p in problemy %}
<th class='border-r'><a href="{{ p.verejne_url }}">{{ p.cislo_zadani.cislo }}.{{ p.kod }}</a> <th class='border-r'><a href="{{ p.verejne_url }}">{{ p.kod_v_rocniku }}</a>
{% endfor %} {% endfor %}
<th class='border-r'>Za číslo</sup> <th class='border-r'>Za číslo</sup>
<th class='border-r'>Za ročník <th class='border-r'>Za ročník

View file

@ -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') 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 #setridi problemy podle typu a poradi zadani
problem_index = {} problem_index = {}
for i in range(len(problemy)): for i in range(len(problemy)):