|
@ -106,22 +106,18 @@ class TreeNodeView(generic.DetailView): |
|
|
return context |
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AktualniZadaniView(TreeNodeView): |
|
|
|
|
|
def get_object(self): |
|
|
|
|
|
nastaveni = get_object_or_404(Nastaveni) |
|
|
|
|
|
return nastaveni.aktualni_cislo.cislonode |
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self,**kwargs): |
|
|
|
|
|
nastaveni = get_object_or_404(Nastaveni) |
|
|
|
|
|
context = super().get_context_data(**kwargs) |
|
|
|
|
|
verejne = nastaveni.aktualni_cislo.verejne() |
|
|
|
|
|
context['verejne'] = verejne |
|
|
|
|
|
return context |
|
|
|
|
|
|
|
|
#def AktualniZadaniView(request): |
|
|
|
|
|
# nastaveni = get_object_or_404(Nastaveni) |
|
|
|
|
|
# verejne = nastaveni.aktualni_cislo.verejne() |
|
|
|
|
|
# problemy = Problem.objects.filter(cislo_zadani=nastaveni.aktualni_cislo).filter(stav = 'zadany') |
|
|
|
|
|
# ulohy = problemy.filter(typ = 'uloha').order_by('kod') |
|
|
|
|
|
# serialy = problemy.filter(typ = 'serial').order_by('kod') |
|
|
|
|
|
# jednorazove_problemy = [ulohy, serialy] |
|
|
|
|
|
# return render(request, 'seminar/zadani/AktualniZadani.html', |
|
|
|
|
|
# {'nastaveni': nastaveni, |
|
|
|
|
|
# 'jednorazove_problemy': jednorazove_problemy, |
|
|
|
|
|
# 'temata': verejna_temata(nastaveni.aktualni_rocnik), |
|
|
|
|
|
# 'verejne': verejne, |
|
|
|
|
|
# }, |
|
|
|
|
|
# ) |
|
|
|
|
|
# |
|
|
|
|
|
#def ZadaniTemataView(request): |
|
|
#def ZadaniTemataView(request): |
|
|
# nastaveni = get_object_or_404(Nastaveni) |
|
|
# nastaveni = get_object_or_404(Nastaveni) |
|
|
# temata = verejna_temata(nastaveni.aktualni_rocnik) |
|
|
# temata = verejna_temata(nastaveni.aktualni_rocnik) |
|
@ -892,7 +888,7 @@ def soustredeniUcastniciExportView(request,soustredeni): |
|
|
class ClankyResitelView(generic.ListView): |
|
|
class ClankyResitelView(generic.ListView): |
|
|
model = Problem |
|
|
model = Problem |
|
|
template_name = 'seminar/clanky/resitelske_clanky.html' |
|
|
template_name = 'seminar/clanky/resitelske_clanky.html' |
|
|
queryset = Clanek.objects.filter(stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod') |
|
|
queryset = Clanek.objects.filter(stav=Problem.STAV_ZADANY, resitelsky=True).select_related('cislo__rocnik').order_by('-cislo__rocnik__rocnik', 'kod') |
|
|
|
|
|
|
|
|
# FIXME: pokud chceme orgoclanky, tak nejak zavest do modelu a podle toho odkomentovat a upravit |
|
|
# FIXME: pokud chceme orgoclanky, tak nejak zavest do modelu a podle toho odkomentovat a upravit |
|
|
#class ClankyOrganizatorView(generic.ListView)<F12>: |
|
|
#class ClankyOrganizatorView(generic.ListView)<F12>: |
|
|