Browse Source

Merge branch 'master' into test

middleware_test
Matěj Kocián 6 years ago
parent
commit
48c984317d
  1. 6
      mamweb/settings_prod.py
  2. 2
      seminar/views.py

6
mamweb/settings_prod.py

@ -47,11 +47,7 @@ DATABASES = {
import os import os
SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz' SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz'
ADMINS = [ ADMINS = [('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz')]
('Tomas Gavenciak', 'gavento@gmail.com'),
('Matěj Kocián', 'matej.kocian@gmail.com'),
('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'),
]
# SECURITY: only send sensitive cookies via HTTPS # SECURITY: only send sensitive cookies via HTTPS

2
seminar/views.py

@ -550,7 +550,7 @@ def aktivniResitele(rocnik,cislo):
letos.cisla = Cislo.objects.filter(rocnik=letos.rocnik,cislo__lte = cislo) letos.cisla = Cislo.objects.filter(rocnik=letos.rocnik,cislo__lte = cislo)
loni.cisla = Cislo.objects.filter(rocnik=loni.rocnik) loni.cisla = Cislo.objects.filter(rocnik=loni.rocnik)
if int(cislo) > 3: if int(cislo) > 3:
problemy = Problem.objects.filter(cislo_zadani = letos.cisla) problemy = Problem.objects.filter(cislo_zadani__in = letos.cisla)
else: else:
problemy = Problem.objects.filter(Q(cislo_zadani__in = letos.cisla)|Q(cislo_zadani__in = loni.cisla)) problemy = Problem.objects.filter(Q(cislo_zadani__in = letos.cisla)|Q(cislo_zadani__in = loni.cisla))
resitele = aktualni_resitele.filter(reseni__in = Reseni.objects.filter(problem__in=problemy)).distinct() resitele = aktualni_resitele.filter(reseni__in = Reseni.objects.filter(problem__in=problemy)).distinct()

Loading…
Cancel
Save