def bill_list(format, page=0, limit=50): bills = schema.Bill.select(limit=limit, offset=page*limit, order='session desc, introduced desc, number desc') out = apipublish.publish(bills, format) if out: return out #@@ add link to next page return render.bill_list(bills, limit)
def bill_list(format, page=0, limit=50): bills = db.select('bill', limit=limit, offset=page*limit, order='session desc').list() out = apipublish.publish({ 'uri': apipublish.generic(lambda x: 'http://watchdog.net/b/' + x.id), 'type': 'Bill', 'title': apipublish.identity, }, bills, format) if out: return out return render.bill_list(bills, limit)
def bill_list(format, page=0, limit=50): bills = schema.Bill.select( limit=limit, offset=page * limit, order='session desc, introduced desc, number desc') out = apipublish.publish(bills, format) if out: return out #@@ add link to next page return render.bill_list(bills, limit)