Ejemplo n.º 1
0
 def __init__(self, gqlQuery,page_number,per_page, count=None,orphans=0, allow_empty_first_page=True):
     if count is not None:
         #for the list large than 1000, we should pass the count value from the counter outside.
         #as google appengine has the limitation of 1000 records from the GqlQuery.
         self.count_ = count
     else:
         self.count_ = int(gqlQuery.count())
     self.number = page_number
     bottom = (self.number - 1) * per_page
     self.object_list = gqlQuery.fetch(per_page,bottom)
     Paginator.__init__(self, self.object_list, per_page, orphans, allow_empty_first_page)
Ejemplo n.º 2
0
 def __init__(self, gqlQuery,page_number,per_page, orphans=0, allow_empty_first_page=True):
     self.count_ = int(gqlQuery.count()) ##todo:google GqlQuery has 1000 records limit.
     self.number = page_number
     bottom = (self.number - 1) * per_page
     self.object_list = gqlQuery.fetch(per_page,bottom)
     Paginator.__init__(self, self.object_list, per_page, orphans, allow_empty_first_page)
Ejemplo n.º 3
0
 def __init__(self, gqlQuery,page_number,per_page, orphans=0, allow_empty_first_page=True):
     self.gqlQuery = gqlQuery
     self.number = page_number
     bottom = (self.number - 1) * per_page
     self.object_list = gqlQuery.fetch(per_page,bottom)
     Paginator.__init__(self, self.object_list, per_page, orphans, allow_empty_first_page)