komentar maturity
This commit is contained in:
parent
be4fda5e7f
commit
b7ac841760
1 changed files with 3 additions and 3 deletions
|
@ -34,8 +34,7 @@ def resi_cislo(cislo):
|
||||||
cislo (typu Cislo) číslo, ve kterém chci řešitele, co něco odevzdali
|
cislo (typu Cislo) číslo, ve kterém chci řešitele, co něco odevzdali
|
||||||
Výstup:
|
Výstup:
|
||||||
QuerySet objektů typu Resitel
|
QuerySet objektů typu Resitel
|
||||||
|
"""
|
||||||
Nejsem si moc jistý, jestli to tak funguje... Vašek """
|
|
||||||
|
|
||||||
return personalni.models.Resitel.objects.filter(
|
return personalni.models.Resitel.objects.filter(
|
||||||
reseni__hodnoceni__deadline_body__cislo=cislo
|
reseni__hodnoceni__deadline_body__cislo=cislo
|
||||||
|
@ -43,11 +42,12 @@ def resi_cislo(cislo):
|
||||||
|
|
||||||
def resitele_co_neodmaturovali():
|
def resitele_co_neodmaturovali():
|
||||||
""" Vrátí seznam řešitelů, co ještě neodmaturovali.
|
""" Vrátí seznam řešitelů, co ještě neodmaturovali.
|
||||||
|
Pokud ještě není srpen, tak tak zahrnuje i ty, kteří odmaturovali letos.
|
||||||
|
|
||||||
Výstup:
|
Výstup:
|
||||||
QuerySet objektů typu Resitel """
|
QuerySet objektů typu Resitel """
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
current_year = datetime.now().year
|
current_year = datetime.now().year
|
||||||
'''Člověk odmaturuje když je jeho rok maturity menší nebo stejný jako aktuální rok? '''
|
|
||||||
if datetime.now().month < 8:
|
if datetime.now().month < 8:
|
||||||
current_year -= 1
|
current_year -= 1
|
||||||
return personalni.models.Resitel.objects.filter(rok_maturity__gte=current_year)
|
return personalni.models.Resitel.objects.filter(rok_maturity__gte=current_year)
|
||||||
|
|
Loading…
Reference in a new issue