Browse Source

Lepší "Moje problémy"

middleware_test
Pavel "LEdoian" Turinsky 3 years ago
parent
commit
8e47df2865
  1. 22
      seminar/views/views_all.py

22
seminar/views/views_all.py

@ -846,17 +846,17 @@ class OrgoRozcestnikView(TemplateView):
u = self.request.user u = self.request.user
os = s.Osoba.objects.get(user=u) os = s.Osoba.objects.get(user=u)
organizator = s.Organizator.objects.get(osoba=os) organizator = s.Organizator.objects.get(osoba=os)
temata_garant = s.Tema.objects.filter(garant=organizator, #FIXME: přidat stav='STAV_ZADANY'
rocnik=aktualni_rocnik) temata = s.Tema.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
#FIXME: přidat opravovatel, stav='STAV_ZADANY' rocnik=aktualni_rocnik).distinct()
ulohy_garant = s.Uloha.objects.filter(garant=organizator, ulohy = s.Uloha.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
cislo_zadani__rocnik=aktualni_rocnik) cislo_zadani__rocnik=aktualni_rocnik).distinct()
clanky_garant = s.Clanek.objects.filter(garant=organizator, clanky = s.Clanek.objects.filter(Q(garant=organizator) | Q(autor=organizator) | Q(opravovatele__in=[organizator]),
cislo__rocnik=aktualni_rocnik) cislo__rocnik=aktualni_rocnik).distinct()
context['temata'] = temata_garant context['temata'] = temata
context['ulohy'] = ulohy_garant context['ulohy'] = ulohy
context['clanky'] = clanky_garant context['clanky'] = clanky
context['organizator'] = organizator context['organizator'] = organizator
return context return context

Loading…
Cancel
Save