Opened 9 years ago

Closed 9 years ago

#7192 closed (wontfix)

class Paginator::def _get_count(self):

Reported by: kamanwu Owned by: nobody
Component: Tools Version: master
Severity: Keywords: Paginator
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

change:

self._count = len(self.object_list)

to:

try:

self._count = int(self.object_list.count())

except (AttributeError, TypeError, ValueError):

self._count = len(self.object_list)

Change History (1)

comment:1 Changed 9 years ago by Alex Gaynor

Resolution: wontfix
Status: newclosed

There is a separate QuerySetPageinator class that implements using the count method.

Note: See TracTickets for help on using tickets.
Back to Top