From bba1249fc947d75014b005db8af59651d91721a4 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Thu, 10 Sep 2015 11:31:25 +0200 Subject: [PATCH] Razeni uloh a temat podle kodu --- seminar/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seminar/views.py b/seminar/views.py index 1e5e18fa..30843b47 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -18,9 +18,9 @@ from itertools import groupby def AktualniZadaniView(request): nastaveni = get_object_or_404(Nastaveni) problemy = Problem.objects.filter(cislo_zadani=nastaveni.aktualni_cislo).filter(stav = 'zadany') - ulohy = problemy.filter(typ = 'uloha') - serialy = problemy.filter(typ = 'serial') - temata = problemy.filter(typ = 'tema') + ulohy = problemy.filter(typ = 'uloha').order_by('kod') + serialy = problemy.filter(typ = 'serial').order_by('kod') + temata = problemy.filter(typ = 'tema').order_by('kod') jednorazove_problemy = [ulohy, serialy] return render(request, 'seminar/zadani/AktualniZadani.html', {'nastaveni': nastaveni,