ignore case
This commit is contained in:
parent
e56f40d991
commit
fd976735d6
|
@ -125,7 +125,9 @@ def page(request, shortname):
|
||||||
|
|
||||||
def search(request):
|
def search(request):
|
||||||
q = request.GET.get('q')
|
q = request.GET.get('q')
|
||||||
results = Content.objects.filter(Q(body__contains=q) | Q(title__contains=q)).distinct().order_by('-datestart')
|
results = Content.objects.filter(Q(body__icontains=q) | Q(title__icontains=q)).distinct()
|
||||||
|
results = results.filter(published=True)
|
||||||
|
results = results.order_by('-datestart')
|
||||||
page = request.GET.get('page', 1)
|
page = request.GET.get('page', 1)
|
||||||
paginator = Paginator(results, 5)
|
paginator = Paginator(results, 5)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user