Dear Community,I just started with web2py and ran into some difficulties:I would like to display a custom table with my data. For the value of a specific field in each row I need the corresponding information from another table.This is what I have so far:
return extended_infodef manage():ext_info = lambda row: get_extended_info_for_case(row.cases.id)db.cases.extended_info = Field.Virtual(ext_info)rows = db(db.cases).select()headers = ["ID", "A", "B", "C", "Extended Info"]fields = ["id", "a", "b", "c", "extended_info"]table = TABLE(THEAD(TR(*[B(header) for header in headers])),TBODY(*[TR(*[TD(row[field]) for field in fields])for row in rows]))
This works when the helper-function get_extended_info returns just a plain string. However, if I have it return a list of tuples that I can then use to dynamically create links within the virtualfield - one for each tuple - I'm lost.For example:
ext_info = lambda row: [A(op, _href=URL("edit", args=op_id, user_signature=True)) + " "  for op, op_id in get_extended_info_for_case(row.cases.id)] --
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/o6_wQZ_HBgM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.