1 from forum.models import Question
2 from forum.modules.decorators import decorate
3 from forum.views.readers import do_question_search
5 @decorate(do_question_search, needs_origin=False)
6 def question_search(keywords):
7 return Question.objects.all().extra(
9 'ranking': 'node_ranking("forum_node"."id", %s)',
11 where=['node_ranking("forum_node"."id", %s) > 0'],
13 select_params=[keywords],