diff --git a/gestion/whos.py b/gestion/whos.py index 0b2bb83b..11b3fa62 100755 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -108,8 +108,12 @@ def adhers_brief(adhers) : * machines """ data = [] + + # Copie locale triée par (nom, prenom) + adhers = adhers[:] + adhers.sort(lambda x, y: cmp((x.nom(), x.prenom()), (y.nom(), y.prenom()))) - for a in adhers : + for a in adhers: ## Etat administratif ok = u'\x1b[1;32mo\x1b[1;0m' ook = u'\x1b[1;32mO\x1b[1;0m' @@ -161,6 +165,10 @@ def machines_brief(machines) : * si blacklistée """ data = [] + + # Copie locale triée par nom + machines = machines[:] + machines.sort(lambda x, y: cmp(x.nom(), y.nom())) for m in machines : t, bl = __bases_machines(m) @@ -191,6 +199,10 @@ def clubs_brief(clubs) : * machines """ data = [] + + # Copie locale triée par Nom + clubs = clubs[:] + clubs.sort(lambda x, y: cmp(x.Nom(), y.Nom())) for c in clubs : ## Etat administratif @@ -241,6 +253,10 @@ def list_machines(machines) : """ data = [] + # Copie locale triée par nom + machines = machines[:] + machines.sort(lambda x, y: cmp(x.nom(), y.nom())) + for m in machines : t, bl = __bases_machines(m) @@ -266,6 +282,10 @@ def list_bornes(bornes) : """ data = [] + # Copie locale triée par nom + bornes = bornes[:] + bornes.sort(lambda x, y: cmp(x.nom(), y.nom())) + ok = u'\x1b[1;32mu\x1b[1;0m' nok = u'\x1b[1;31md\x1b[1;0m' for b in bornes :