예제 #1
0
 def index(self, *args):
     self.SetTemplate(templateName="Grouper_index.html")
     results =None
     index = 0; count=20
     try:
         index = int(self.params.index)
         count = int(self.params.count)
     except:
         pass
     nextIndex = index+count;
     previousIndex = index<=0 and -1 or (index-count>0 and 0 or index-count) 
     result = {'GrouperList': Grouper.all().fetch(limit=count, offset=index)}
     result.update(locals())
     return result
예제 #2
0
 def index(self, *args):
     self.SetTemplate(templateName="Grouper_index.html")
     results = None
     index = 0
     count = 20
     try:
         index = int(self.params.index)
         count = int(self.params.count)
     except:
         pass
     nextIndex = index + count
     previousIndex = index <= 0 and -1 or (index - count > 0 and 0
                                           or index - count)
     result = {
         'GrouperList': Grouper.all().fetch(limit=count, offset=index)
     }
     result.update(locals())
     return result