Order songs by artist and title.

This commit is contained in:
Jim Driessen
2017-01-22 13:34:43 +01:00
parent e9f4d6111b
commit 33290df16b

View File

@ -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)