Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 14 and Version 15 of Search_Pagination


Ignore:
Timestamp:
03/23/06 03:00:21 (13 years ago)
Author:
fredlin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Search_Pagination

    v14 v15  
    191191 
    192192Then you can remove the <?python ...?> section in "pagesearch.kid", becausse "query_size", "end" params are already returned by "controller.py". 
     193 
     194Then we can try to assign values in dict direcly and remove the temporary parameters.  
     195 
     196Finally the code will look like: 
     197 
     198{{{ 
     199@expose(html=".templates.welcome") 
     200def index(self, start = 0): 
     201    a = TableEntry.select(TableEntry.q.fieldA == True, orderBy='fieldB') 
     202    return dict(context = a[start:(start+offset)], 
     203                start = int(start)*10,  
     204                offset = 20,  
     205                query_size = a.count(),  
     206                end = start+offset, 
     207                ) 
     208}}}