Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)