Browse Source

Oprava nastaveni posilani chybovych mailu

remotes/origin/vysl
Tomas Gavenciak 9 years ago
parent
commit
35d9f0ccd1
  1. 7
      mamweb/settings_prod.py
  2. 7
      seminar/models.py
  3. 2
      seminar/templates/seminar/archiv/cislo_vysledkovka.tex

7
mamweb/settings_prod.py

@ -33,8 +33,11 @@ DATABASES = {
import os
SERVER_EMAIL = 'prod-errors@mam.mff.cuni.cz'
ADMINS = ['gavento@ucw.cz', ]
SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz'
ADMINS = [
('Tomas Gavenciak', 'gavento@ucw.cz'),
]
# LOGGING = {
# 'version': 1,

7
seminar/models.py

@ -211,7 +211,10 @@ class Resitel(SeminarModelBase):
}
def rocnik(self, datum):
"Vypise skolni rocnik resitele pro zadane datum typu datetime."
"""Vypise skolni rocnik resitele pro zadane datum typu datetime.
Vraci None pro neznamy rocnik."""
if self.rok_maturity is None:
return None
rozdil = self.rok_maturity - datum.year
if datum.month < 9:
return 4 - rozdil
@ -221,7 +224,7 @@ class Resitel(SeminarModelBase):
def titul(self, celkove_body):
"Vrati titul podle zadaneho poctu bodu."
if celkove_body < 10:
return None
return ''
elif celkove_body < 20:
return 'Bc.'
elif celkove_body < 50:

2
seminar/templates/seminar/archiv/cislo_vysledkovka.tex

@ -24,7 +24,7 @@
{% if rv.resitel.titul %}
\titul{ {{ rv.resitel.titul }} }
{% endif %}
{{ rv.resitel.plne_jmeno }} & {{ rv.resitel.rocnik}} & {{ rv.body_minule }}
{{ rv.resitel.plne_jmeno }} & {{ rv.resitel.rocnik |default:"" }} & {{ rv.body_minule }}
{% for b in rv.body %}
{{ b }} &
{% endfor %}

Loading…
Cancel
Save