That works:
my_items=crud.select(db.t_categories,db.t_categories.created_by==auth.user.id,fields=
 
\
        ['f_category_name'],headers={'t_categories.f_category_name': ''} )

 {{for item in my_items:}}
        {{=item[0]}}
        {{pass}}

Left it null here to not display it :'t_categories.f_category_name': ''

On Monday, September 23, 2013 8:28:49 PM UTC+3, Avi A wrote:
>
> Hi,
> i'm using this for a user to see only items he owns:
> my_items=crud.select(db.t_categories,db.t_categories.created_by==
> auth.user.id )
> Which returns as a dict.
> if i use {{=my_items}} I can see I got the expected list.
> but I didn't find a way how to render it:
> This is what I was trying for both table fields:
> {{for item in my_items:}}
> {{=item.f_category.id}}  (or i try)  {{=item.f_category_name}}
> {{pass}}
> the error:
> <type 'exceptions.AttributeError'>('THEAD' object has no attribute 
> 'f_category')
> Thanks.
>

-- 
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/groups/opt_out.

Reply via email to