summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorashwinishinde2015-05-14 11:35:08 +0530
committerashwinishinde2015-05-14 11:35:08 +0530
commite68d57dba6f9193d75c48d218dd98c7592e776ee (patch)
tree570d2008ca4e31247f1eb04bc339508cd628a994 /website
parent0e3fdb61376f2037a7f0745bc363b946eafd5517 (diff)
downloadFOSSEE-Forum-e68d57dba6f9193d75c48d218dd98c7592e776ee.tar.gz
FOSSEE-Forum-e68d57dba6f9193d75c48d218dd98c7592e776ee.tar.bz2
FOSSEE-Forum-e68d57dba6f9193d75c48d218dd98c7592e776ee.zip
Subject: Search By Keyword
Description: 1)solved problem in filter.
Diffstat (limited to 'website')
-rw-r--r--website/views.py8
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