diff --git a/marietje/api/views.py b/marietje/api/views.py index 35e6d24..42a7a0d 100644 --- a/marietje/api/views.py +++ b/marietje/api/views.py @@ -35,7 +35,7 @@ def songs(request): title__icontains=request.POST.get('title', ''), user__name__icontains=request.POST.get('uploader', '') ).order_by('artist', 'title').select_related('user') - total = len(songs_query) + total = songs_query.count() paginator = Paginator(songs_query, pagesize) try: @@ -77,7 +77,7 @@ def managesongs(request): title__icontains=request.POST.get('title', '') ).order_by('artist', 'title') - total = len(songs_query) + total = songs_query.count() paginator = Paginator(songs_query, pagesize) try: