Tip of the day: Improved SQLTABLE (with edit and remove options)

5 views
Skip to first unread message

blackthorne

unread,
May 11, 2009, 1:25:29 PM5/11/09
to web2py Web Framework
db.table.field.represent = lambda value: UL(
LI(A(T('edit'),_href=URL(r=request, c='default',f='data/update/
table', args=str(value)))),
LI(A(T('remove'),_href=URL(r=request, c='default',f='data/
delete/table', args=str(value)))))

then make your SQLTABLE, e.g.: SQLTABLE(db().select(db.table.ALL)) and
enjoy

Commends/tweaks/feedback are welcome


Reply all
Reply to author
Forward
0 new messages