+class AnswerPaginatorContext(pagination.PaginatorContext):
+ def __init__(self):
+ super (AnswerPaginatorContext, self).__init__('ANSWER_LIST', sort_methods=(
+ (_('oldest'), pagination.SimpleSort(_('oldest answers'), 'added_at', _("oldest answers will be shown first"))),
+ (_('latest'), pagination.SimpleSort(_('newest answers'), '-added_at', _("newest answers will be shown first"))),
+ (_('votes'), pagination.SimpleSort(_('popular answers'), '-score', _("most voted answers will be shown first"))),
+ ), default_sort=_('votes'), pagesizes=(5, 10, 20))
+
+ self.sticky_sort = True
+
+