Should be a list of field *names*, not Field objects (note, you are 
comparing with f.name).

Anthony

On Saturday, July 9, 2016 at 11:51:46 PM UTC-4, Alex Glaros wrote:
>
> am still not understanding a couple of the concepts
>
> the grid query is result of join so I assume I  run one of these [setattr] 
> lines for each table that needs to have fields non-readable?
>
> The below code doesn't remove unwanted fields
>
> query = ((db.strategic_goal.transparency_level_fk == 1) & 
> (db.strategic_goal.organization_fk == db.Organization.id))   
> [setattr(f, 'readable', False) for f in db.Organization if f.name not in 
> (db.Organization.organization_full_name, db.Organization.id)]
> grid = SQLFORM.grid(query) 
>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to