#27: Added default sort for assignments and participants.

This commit is contained in:
Emanuel Schuetze 2011-10-05 21:35:20 +02:00
parent fa5918e951
commit 34f76c8c28
2 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,7 @@ def get_overview(request):
if sort in ['name','status']:
query = query.order_by(sort)
except KeyError:
pass
query = query.order_by('name')
if 'reverse' in request.GET:
query = query.reverse()

View File

@ -79,6 +79,8 @@ def get_overview(request):
query = query.order_by(sortfilter['sort'][0])
elif sortfilter['sort'][0] in ['group', 'type', 'committee']:
query = query.order_by('profile__%s' % sortfilter['sort'][0])
else:
query = query.order_by('first_name')
if 'reverse' in sortfilter:
query = query.reverse()