Beispiel #1
0
    def GET (self, page = 0):
        #if web.input().has_key('q'):
        #   return web.seeother('/search/?' + utils.url_encode(web.input()))

        latest_functions, has_next = functions.getLatest(offset=page * listLimit)
        return render.layout(
            view.list_functions(latest_functions, has_next, sub_title='Latest Functions')
        )
Beispiel #2
0
    def GET(self, page_number):
        page_number = int(page_number)

        latest_functions, has_next = functions.getFromCategory(categoryId=0 ,offset=page_number * listLimit )

        next_page_url = ''
        if has_next:
            next_page_url = '/page/%s/' % (page_number + 1)

        sub_title = 'Latest functions'
        if page_number:
             sub_title += ' - Page %s' % (page_number + 1)

        return render.layout(
            view.list_functions(latest_functions, next_page_url=next_page_url, sub_title=sub_title),
            title = page_number and 'Page %s - Functions' % (page_number + 1) or 'Functions')