diff --git a/marietje/api/views.py b/marietje/api/views.py index a64615e..4cc442f 100644 --- a/marietje/api/views.py +++ b/marietje/api/views.py @@ -33,7 +33,8 @@ def songs(request): deleted=False, artist__icontains=request.POST.get('artist', ''), title__icontains=request.POST.get('title', ''), - user__name__icontains=request.POST.get('uploader', '')) + user__name__icontains=request.POST.get('uploader', '') + ).order_by('artist', 'title') total = len(songs_query) paginator = Paginator(songs_query, pagesize) @@ -73,7 +74,8 @@ def managesongs(request): songs_query = Song.objects.filter( user=request.user, deleted=False, artist__icontains=request.POST.get('artist', ''), - title__icontains=request.POST.get('title', '')) + title__icontains=request.POST.get('title', '') + ).order_by('artist', 'title') total = len(songs_query) paginator = Paginator(songs_query, pagesize)