Opened 17 years ago

Closed 17 years ago

#7192 closed (wontfix)

class Paginator::def _get_count(self):

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

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 by Alex Gaynor, 17 years ago

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