Ticket #11287: 10953.patch
File 10953.patch, 636 bytes (added by , 15 years ago) |
---|
-
django/core/paginator.py
118 118 if self.number == self.paginator.num_pages: 119 119 return self.paginator.count 120 120 return self.number * self.paginator.per_page 121 122 class NBPageList(object): 123 """ 124 Better performance of the page class 125 """ 126 def __init__(self, model): 127 self.model = model 128 def count(self): 129 return self.model.count() 130 def __getslice__(self,i,j): 131 return self.model.all()[i:j]