diff options
Diffstat (limited to 'website/views.py')
-rw-r--r-- | website/views.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/website/views.py b/website/views.py index 516c7d4..603a4c7 100644 --- a/website/views.py +++ b/website/views.py @@ -21,7 +21,7 @@ from django.db.models import Count admins = ( - 9, 4376, 4915, 14595, 12329, 22467, 5518, 30705 + 9, 4376, 4915, 14595, 12329, 22467, 5518, 30705 ) categories = FossCategory.objects.order_by('name') @@ -497,10 +497,14 @@ def ajax_notification_remove(request): def ajax_keyword_search(request): if request.method == "POST": key = request.POST['key'] - questions = Question.objects.filter(title__icontains=key) + + questions = Question.objects.filter(title__contains=key) + context = { 'questions': questions } + + return render(request, 'website/templates/ajax-keyword-search.html', context) @csrf_exempt |