Lepší "Moje problémy"
This commit is contained in:
parent
26f0082951
commit
8e47df2865
1 changed files with 10 additions and 10 deletions
|
@ -846,17 +846,17 @@ class OrgoRozcestnikView(TemplateView):
|
|||
u = self.request.user
|
||||
os = s.Osoba.objects.get(user=u)
|
||||
organizator = s.Organizator.objects.get(osoba=os)
|
||||
temata_garant = s.Tema.objects.filter(garant=organizator,
|
||||
rocnik=aktualni_rocnik)
|
||||
#FIXME: přidat opravovatel, stav='STAV_ZADANY'
|
||||
ulohy_garant = s.Uloha.objects.filter(garant=organizator,
|
||||
cislo_zadani__rocnik=aktualni_rocnik)
|
||||
clanky_garant = s.Clanek.objects.filter(garant=organizator,
|
||||
cislo__rocnik=aktualni_rocnik)
|
||||
#FIXME: přidat stav='STAV_ZADANY'
|
||||
temata = s.Tema.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
|
||||
rocnik=aktualni_rocnik).distinct()
|
||||
ulohy = s.Uloha.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
|
||||
cislo_zadani__rocnik=aktualni_rocnik).distinct()
|
||||
clanky = s.Clanek.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
|
||||
cislo__rocnik=aktualni_rocnik).distinct()
|
||||
|
||||
context['temata'] = temata_garant
|
||||
context['ulohy'] = ulohy_garant
|
||||
context['clanky'] = clanky_garant
|
||||
context['temata'] = temata
|
||||
context['ulohy'] = ulohy
|
||||
context['clanky'] = clanky
|
||||
context['organizator'] = organizator
|
||||
return context
|
||||
|
||||
|
|
Loading…
Reference in a new issue