def board_listing(request):
"""Return a paginated board listing view showing all boards and their popularity."""
board_list = Board.objects.order_by('-pub_date')
metric_timeout_seconds = 60 * 2
desc = _('List of intelligence boards on {name} and summary information').format(name=get_current_site(request).name) # nopep8
context = {
'boards': make_paginator(request, board_list),
'contributors': cache.get_or_set('contributor_count', generate_contributor_count(), metric_timeout_seconds),
'evaluators': cache.get_or_set('evaluator_count', generate_evaluator_count(), metric_timeout_seconds),
'meta_description': desc,
}
return render(request, 'boards/boards.html', context)
评论列表
文章目录