I'm a newbie in Web domain and in Web2Py. A small app I'm working on has
following codes:
<table class="table">
<tr>
<th>ID</th>
<th>Title</th>
<th>For New?</th>
<th>Date Created</th>
<th>Posted by</th>
</tr>
{{for row in rows:}}
<tr>
<td>{{=A(row.id, _href=URL('show', args=row.id))}}</td>
<td>{{=A(row.title, _href=URL('show', args=row.id))}}</td>
<td>{{if row.forNew:}}Yes{{else:}}No{{pass}}</td>
<td>{{=row.created_on}}</td>
<td>{{=row.created_by}}</td>
</tr>
{{pass}}
</table>
The 'row.created_by' is actually a field, with following specification:
Field('created_by', 'reference auth_user'
, default=auth.user_id
, update=auth.user_id
, writable=False
, readable=False
)
*The View shows 'user_id', whereas I want to show the 'user-name'.*
*How can I do that?*
Thank you...
--
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.