mirror of
https://github.com/Damillora/Altessimo
synced 2024-11-23 22:27:32 +00:00
Case insensitive search
This commit is contained in:
parent
0ed9d7b1d5
commit
ed4c2065b6
@ -9,7 +9,7 @@ def artist_index(request):
|
|||||||
objs = {}
|
objs = {}
|
||||||
if "q" in request.GET:
|
if "q" in request.GET:
|
||||||
q = request.GET['q']
|
q = request.GET['q']
|
||||||
artists = Artist.objects.filter(name__contains=q) | Artist.objects.filter(romanized_name__contains=q)
|
artists = Artist.objects.filter(name__icontains=q) | Artist.objects.filter(romanized_name__icontains=q)
|
||||||
objs['q'] = q
|
objs['q'] = q
|
||||||
objs['artists'] = artists
|
objs['artists'] = artists
|
||||||
return render(request,'artists/index.html',objs)
|
return render(request,'artists/index.html',objs)
|
||||||
|
@ -8,7 +8,7 @@ def song_index(request):
|
|||||||
objs = {}
|
objs = {}
|
||||||
if "q" in request.GET:
|
if "q" in request.GET:
|
||||||
q = request.GET['q']
|
q = request.GET['q']
|
||||||
songs = Song.objects.filter(title__contains=q) | Song.objects.filter(romanized_title__contains=q)
|
songs = Song.objects.filter(title__icontains=q) | Song.objects.filter(romanized_title__icontains=q)
|
||||||
objs['q'] = q
|
objs['q'] = q
|
||||||
paginator = Paginator(songs, 100)
|
paginator = Paginator(songs, 100)
|
||||||
page_number = request.GET.get('page',1)
|
page_number = request.GET.get('page',1)
|
||||||
|
Loading…
Reference in New Issue
Block a user