In that case because there is no join, it would just be row.first_name, not
row.auth_user.first_name.
Anthony
On Monday, November 3, 2014 8:36:54 PM UTC-5, Alex Glaros wrote:
>
> pasted the line in but only primary key displays - not the full name
>
> controller
> def person_represent(id, r):
> row = db.auth_user(id)
> return '%s %s %s' % (row.auth_user.first_name,
> row.auth_user.last_name, row.auth_user.currentPosition)
> db.SuperObjectComment.created_by.represent = person_represent
>
> view
> {{extend 'layout.html'}}
> <table>
> {{for objectComment in objectComments:}}
> <tr>
> <td>{{=objectComment.created_on}}</td>
> <td>{{=objectComment.created_by}}</td>
> <td>{{=MARKMIN(objectComment.superObjectComment)}}</td>
> </tr>
> {{pass}}
> </table>
> <hr>
> {{=form}}
>
> what is missing that would display the full name?
>
--
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.