@ -261,23 +261,8 @@ class TitulniStranaView(generic.ListView):
context = super ( TitulniStranaView , self ) . get_context_data ( * * kwargs )
nastaveni = get_object_or_404 ( Nastaveni )
deadline_soustredeni = ( nastaveni . aktualni_cislo . datum_deadline_soustredeni , " soustredeni " )
preddeadline = ( nastaveni . aktualni_cislo . datum_preddeadline , " preddeadline " )
deadline = ( nastaveni . aktualni_cislo . datum_deadline , " deadline " )
try :
nejblizsi_deadline = sorted ( filter ( lambda dl : dl [ 0 ] is not None and dl [ 0 ] > = date . today ( ) , [ deadline_soustredeni , preddeadline , deadline ] ) ) [ 0 ]
if nejblizsi_deadline [ 0 ] == deadline_soustredeni [ 0 ] :
nejblizsi_deadline = deadline_soustredeni
except IndexError :
nejblizsi_deadline = ( None , None ) # neni zadna aktualni deadline
if nejblizsi_deadline [ 0 ] is not None :
context [ ' nejblizsi_deadline ' ] = datetime . combine ( nejblizsi_deadline [ 0 ] , datetime . max . time ( ) )
else :
context [ ' nejblizsi_deadline ' ] = None
context [ ' typ_deadline ' ] = nejblizsi_deadline [ 1 ]
deadline = m . Deadline . objects . filter ( deadline__gte = timezone . now ( ) ) . order_by ( " deadline " ) . first ( )
context [ ' nejblizsi_deadline ' ] = deadline
# Aktuální témata
nazvy_a_odkazy_na_aktualni_temata = [ ]