Here is my links code:
links = [
dict(header='Balance', body=lambda row: row.po.amount -
row.invoice_items.amount_pretax),
dict(header='Controls', body=[
lambda row: A('Invoices',_class='button btn
btn-default',_href=URL('invoice', 'list', args=['commitment', row.po.id],
vars=dict(source=here))),
lambda row: A('Edit',_class='button btn
btn-default',_href=URL('edit', args=row.po.id, vars=dict(source=here))),
lambda row: A('Files',_class='button btn
btn-default',_href=URL('attachments', 'list',
args=['commitment',row.po.id], vars=dict(source=here))),
lambda row: A('Delete',_class='button btn
btn-default',_href=URL('delete', args=row.po.id, vars=dict(source=here)))
]
]
However, I get an "attribution error" for the first dict, and a "list not
callable" for the controls dict.
What is the correct method for adding multiple columns with one column
having multiple links in it?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.