]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/commands.py
Makes tags and users lists use the new paginators, completelly remove the old cnprog...
[osqa.git] / forum / views / commands.py
index ed72bd1058d7799afd96cb0271cea7e9fd0b68e2..3c4907688a531a693fac96a68f782ffb4fc4b62a 100644 (file)
@@ -480,10 +480,10 @@ def matching_tags(request):
 
 def related_questions(request):
     if request.POST and request.POST.get('title', None):
+        can_rank, questions = Question.objects.search(request.POST['title'])
         return HttpResponse(simplejson.dumps(
                 [dict(title=q.title, url=q.get_absolute_url(), score=q.score, summary=q.summary)
-                 for q in Question.objects.search(request.POST['title']).filter_state(deleted=False)[0:10]]),
-                            mimetype="application/json")
+                 for q in questions.filter_state(deleted=False)[0:10]]), mimetype="application/json")
     else:
         raise Http404()