Sorry, I've been trying various combinations. Here's what I've tried, none
of them work.
#db.sessions.session_name.represent = lambda session_name, row:
A(row.session_name, _href=URL('demo', 'tests_for_this_eval',*
args=sessions.id*))
# global name 'sessions' is not defined
#db.sessions.session_name.represent = lambda session_name, row:
A(row.session_name, _href=URL('demo', 'tests_for_this_eval',
*args=db.sessions.id*))
# page renders, but controller does not pass sessions.id as arg;
sessions.id does show up in rendered page as a field
#db.sessions.session_name.represent = lambda session_name, row:
A(row.session_name, _href=URL('demo', 'tests_for_this_eval', *args=row.id*))
# 'Row' object has no attribute 'id'
#db.sessions.session_name.represent = lambda session_name, row:
A(row.session_name, _href=URL('demo', 'tests_for_this_eval',
*args=row.sessions.id*))
# 'Row' object has no attribute 'sessions'
On Friday, March 6, 2015 at 2:30:15 PM UTC-5, Leonel Câmara wrote:
>
> You have 'db' instead of 'row' in your args.
>
--
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.