Autocomplete: Doplňovat i články
This commit is contained in:
parent
ccab1b1bf3
commit
efdd32427e
1 changed files with 2 additions and 0 deletions
|
@ -34,7 +34,9 @@ class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView):
|
|||
rocnik = nastaveni.aktualni_rocnik
|
||||
temata = m.Tema.objects.filter(rocnik=rocnik, stav=m.Problem.STAV_ZADANY)
|
||||
ulohy = m.Uloha.objects.filter(cislo_deadline__rocnik = rocnik)
|
||||
clanky = m.Clanek.objects.filter(cislo__rocnik = rocnik, stav=m.Problem.STAV_ZADANY) # FIXME: Je tohle to, co chceme?
|
||||
ulohy.union(temata)
|
||||
ulohy.union(clanky)
|
||||
qs = ulohy
|
||||
if self.q:
|
||||
qs = qs.filter(
|
||||
|
|
Loading…
Reference in a new issue