forked from ScoDoc/ScoDoc
tri des billets
This commit is contained in:
parent
bdaf416ccb
commit
4da21bf4d3
@ -78,6 +78,15 @@ def table_billets(
|
||||
for billet in billets:
|
||||
billet_dict = billet.to_dict()
|
||||
rows.append(billet_dict)
|
||||
billet_dict["_nomprenom_order"] = (
|
||||
billet.etudiant.sort_key if billet.etudiant else ""
|
||||
)
|
||||
billet_dict["_abs_begin_str_order"] = (
|
||||
billet.abs_begin.isoformat() if billet.abs_begin else ""
|
||||
)
|
||||
billet_dict["_abs_begin_str_order"] = (
|
||||
billet.abs_begin.isoformat() if billet.abs_end else ""
|
||||
)
|
||||
if billet_dict["abs_begin"].hour < 12:
|
||||
m = " matin"
|
||||
else:
|
||||
@ -116,7 +125,7 @@ def table_billets(
|
||||
billet_dict["nomprenom"] = "???" # should not occur
|
||||
else:
|
||||
billet_dict["nomprenom"] = billet.etudiant.nomprenom
|
||||
billet_dict["_nomprenom_disp_order"] = billet.etudiant.sort_key
|
||||
billet_dict["_nomprenom_order"] = billet.etudiant.sort_key
|
||||
billet_dict[
|
||||
"_nomprenom_td_attrs"
|
||||
] = f'id="{billet.etudiant.id}" class="etudinfo"'
|
||||
|
Loading…
Reference in New Issue
Block a user