Add page_suffix to contest search
This commit is contained in:
parent
7ae01bde13
commit
5a892f5a17
1 changed files with 5 additions and 1 deletions
|
@ -81,6 +81,7 @@ class ContestList(DiggPaginatorMixin, TitleMixin, ContestListMixin, ListView):
|
|||
template_name = 'contest/list.html'
|
||||
title = gettext_lazy('Contests')
|
||||
context_object_name = 'past_contests'
|
||||
first_page_href = None
|
||||
|
||||
@cached_property
|
||||
def _now(self):
|
||||
|
@ -142,6 +143,9 @@ class ContestList(DiggPaginatorMixin, TitleMixin, ContestListMixin, ListView):
|
|||
context['contest_query'] = self.contest_query
|
||||
context['org_query'] = self.org_query
|
||||
context['organizations'] = Organization.objects.all()
|
||||
context['page_suffix'] = suffix = (
|
||||
'?' + self.request.GET.urlencode()) if self.request.GET else ''
|
||||
context['first_page_href'] = (self.first_page_href or '.') + suffix
|
||||
return context
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue