summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorJayaram Pai2014-05-03 21:40:11 +0530
committerJayaram Pai2014-05-03 21:40:11 +0530
commit8d21bc76eb8b779e655847c12d6c503c833764a4 (patch)
treea3aac04e85c13feebecc89e0d0c78d41ea340884 /website
parent0a8b9fd4976f5d67c2b9701eb52ac4c6a309eec7 (diff)
downloadFOSSEE-Forum-8d21bc76eb8b779e655847c12d6c503c833764a4.tar.gz
FOSSEE-Forum-8d21bc76eb8b779e655847c12d6c503c833764a4.tar.bz2
FOSSEE-Forum-8d21bc76eb8b779e655847c12d6c503c833764a4.zip
ignored question in filter added back with highlight
Diffstat (limited to 'website')
-rw-r--r--website/views.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/website/views.py b/website/views.py
index e349daa..842b12b 100644
--- a/website/views.py
+++ b/website/views.py
@@ -207,12 +207,9 @@ def filter(request, category=None, tutorial=None, minute_range=None, second_ran
questions = Question.objects.filter(category=category).filter(tutorial=tutorial).filter(minute_range=minute_range)
if 'qid' in request.GET:
- qid = request.GET['qid']
- question = get_object_or_404(Question, id=qid)
- context['question'] = question
- questions = questions.filter(~Q(id=qid))
+ context['qid'] = int(request.GET['qid'])
- context['questions'] = questions
+ context['questions'] = questions.order_by('date_created').reverse()
return render(request, 'website/templates/filter.html', context)
@login_required