mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 18:52:23 +01:00
Speed up retrieving songs.
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user