Commit 12dffd09 authored by fred's avatar fred

search: order track results

parent f73f30f7
......@@ -248,5 +248,5 @@ class SearchView(TemplateView):
q = self.request.GET.get('q')
if q:
ctx['artists'] = Artist.objects.filter(name__icontains=q.lower())
ctx['tracks'] = Track.objects.filter(title__icontains=q.lower()).select_related()
ctx['tracks'] = Track.objects.filter(title__icontains=q.lower()).order_by('title').select_related()
return ctx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment