Il 09/11/15 15:20, Carla Raquel ha scritto:
> I'm using an SQL grid to display values from two distinct tables. This
> is what I have:
>    
> |
> defmanageUsers():
>
>  query =(db.Extension.Person==db.auth_user.id )
>  grid =SQLFORM.grid(query,csv =False,paginate=25,user_signature=True)
>  return(grid =grid)
> |
>
> The grid shows perfectly fine with both tables fields' associating
> with each other,the problem is, when I click the "edit" button and I
> want to be able to edit fields from both tables, but the fields from
> the table "Extension" appear with "None" attributes. Looking at the
> link in the "Edit" button, only the auth_user table is being sent,
> like this "...manageUsers/edit/auth_user.." so this is why probably
> the other tables' fields show as "None". In my view I access the
> fields like this:
>
> |
> {{=grid.update_form.custom.widget.name_of_field}}
> |
>
> My question is, how can I edit fields from both tables when I click
> the edit button?
Hi Carla,
you can use smartgrid for theese purposes ;)
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-smartgrid

but the use is different from what you expect as I can see from your code...

Cheers

    M.

-- 
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