Commit 1a1b35a5 authored by Zenon Mousmoulas's avatar Zenon Mousmoulas

Sort output according to LC_COLLATE in edumanage contacts management command

parent 326279fe
...@@ -49,7 +49,7 @@ class Command(BaseCommand): ...@@ -49,7 +49,7 @@ class Command(BaseCommand):
and u.registrationprofile_set.all()[0].activation_key == "ALREADY_ACTIVATED" and u.registrationprofile_set.all()[0].activation_key == "ALREADY_ACTIVATED"
) for m in';') ) for m in';')
] ]
data.sort(key=lambda d: unicode(d[0])) data.sort(cmp=locale.strcoll, key=lambda d: unicode(d[0]))
for (foreas, onoma, email) in data: for (foreas, onoma, email) in data:
if options['maillist']: if options['maillist']:
self.stdout.write( self.stdout.write(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment