|
@ -1,3 +1,5 @@ |
|
|
|
|
|
# coding:utf-8 |
|
|
|
|
|
|
|
|
from django.shortcuts import get_object_or_404, render |
|
|
from django.shortcuts import get_object_or_404, render |
|
|
from django.http import HttpResponseRedirect |
|
|
from django.http import HttpResponseRedirect |
|
|
from django.core.urlresolvers import reverse |
|
|
from django.core.urlresolvers import reverse |
|
@ -12,8 +14,14 @@ from . import utils |
|
|
|
|
|
|
|
|
def AktualniZadaniView(request): |
|
|
def AktualniZadaniView(request): |
|
|
nastaveni = get_object_or_404(Nastaveni) |
|
|
nastaveni = get_object_or_404(Nastaveni) |
|
|
|
|
|
problemy = Problem.objects.filter(cislo_zadani=nastaveni.aktualni_cislo) |
|
|
|
|
|
ulohy = problemy.filter(typ = 'uloha') |
|
|
|
|
|
temata = problemy.filter(typ = 'tema') |
|
|
|
|
|
serialy = problemy.filter(typ = 'serial') |
|
|
|
|
|
problemy = [ulohy, temata, serialy] |
|
|
return render(request, 'seminar/zadani/AktualniZadani.html', |
|
|
return render(request, 'seminar/zadani/AktualniZadani.html', |
|
|
{'nastaveni' : nastaveni, |
|
|
{'nastaveni' : nastaveni, |
|
|
|
|
|
'problemy' : problemy, |
|
|
}, |
|
|
}, |
|
|
) |
|
|
) |
|
|
### Titulni strana |
|
|
### Titulni strana |
|
|