X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/4066b758e1b919f2d5e4f8ff4e6abea65fec6777..21edf6f0a6ea39897473c38efa2c69f50baa8932:/forum/views/readers.py diff --git a/forum/views/readers.py b/forum/views/readers.py index 3de8c41..669eaf3 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -92,7 +92,9 @@ def unanswered(request): @decorators.render('questions.html', 'questions', _('questions'), weight=0) def questions(request): - return question_list(request, Question.objects.all(), _('questions')) + return question_list(request, + Question.objects.all(), + _('questions')) @decorators.render('questions.html') def tag(request, tag): @@ -171,10 +173,14 @@ def question_list(request, initial, allowIgnoreTags=True, feed_url=None, paginator_context=None, + show_summary=None, feed_sort=('-added_at',), feed_req_params_exclude=(_('page'), _('pagesize'), _('sort')), extra_context={}): + if show_summary is None: + show_summary = bool(settings.SHOW_SUMMARY_ON_QUESTIONS_LIST) + questions = initial.filter_state(deleted=False) if request.user.is_authenticated() and allowIgnoreTags: @@ -212,6 +218,7 @@ def question_list(request, initial, 'page_title' : page_title, 'tab' : 'questions', 'feed_url': feed_url, + 'show_summary' : show_summary, } context.update(extra_context)