paginators.py (django-paging package):
try:
_page = EndlessPage(list(self.object_list[bottom:top]), number, self)
this line gives an error of type TypeError: unhashable, although this object_list comes from the standard QuerySet, which can be used with [bottom: top] without any problems.
template:
{% with paginate(request, my_queryset) as results %}
{{ results.paging }}
{% for result in results.objects %}
{{ result }}
{% endfor %}
{{ results.paging }}
{% endwith %}`
View:
my_objects = BetterPaginator(queryset,25)
page = 1
context = { 'my_queryset': my_objects.get_context(page) }
source
share