|
|
@ -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: |
|
|
|