8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00

Revert "Merge branch 'paginateur' into 'master'"

This reverts merge request !151
This commit is contained in:
moamoak 2018-05-03 14:13:14 +02:00
parent 34d29349ed
commit 2d92799573

View file

@ -340,7 +340,6 @@ def re2o_paginator(request, query_set, pagination_number):
:request:
:query_set: Query_set to paginate
:pagination_number: Number of entries to display"""
if query_set.count() > pagination_number:
paginator = Paginator(query_set, pagination_number)
page = request.GET.get('page')
try:
@ -351,9 +350,6 @@ def re2o_paginator(request, query_set, pagination_number):
except EmptyPage:
# If page is out of range (e.g. 9999), deliver last page of results.
results = paginator.page(paginator.num_pages)
else:
#If there is only one page, deliver the page without paginator
return query_set
return results