Ticket #7670: ticket-7670.patch

File ticket-7670.patch, 1.2 KB (added by jshaffer, 7 years ago)

Replace QuerySetPaginator with Paginator.

  • views/generic/list_detail.py

     
    4545    if extra_context is None: extra_context = {}
    4646    queryset = queryset._clone()
    4747    if paginate_by:
    48         paginator = QuerySetPaginator(queryset, paginate_by, allow_empty_first_page=allow_empty)
     48        paginator = Paginator(queryset, paginate_by, allow_empty_first_page=allow_empty)
    4949        if not page:
    5050            page = request.GET.get('page', 1)
    5151        try:
  • contrib/admin/views/main.py

     
    611611        return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))
    612612
    613613    def get_results(self, request):
    614         paginator = QuerySetPaginator(self.query_set, self.lookup_opts.admin.list_per_page)
     614        paginator = Paginator(self.query_set, self.lookup_opts.admin.list_per_page)
    615615
    616616        # Get the number of objects, with admin filters applied.
    617617        try:
Back to Top