You mean a profile page with user only allow to update their profile ??

SQLFORM(db.auth_user, record=*auth.user_id*)

It is not clear to understand your goal...

Richard

On Fri, Mar 27, 2015 at 9:32 AM, LoveWeb2py <[email protected]> wrote:

> Hello,
>
> I have a database with a few hundred users. How could I allow them to each
> have their own SQLFORM without modifying auth.user
>
> here is what I have so far:
>
>
> #model
> db.define_table('unique_view_peruser','
>         Field('auth_user_id',' db.auth_user, default=auth.user_id,
> writable=False),
>         Field('field1','boolean'),
>         Field('field2','boolean'),
>         migrate=False)
>
> #controller
> def unique_view():
>      grid = SQLFORM(db.unique_view_peruser)
>      return dict(grid=grid)
>
> when I click on the boolean buttons they're not being updated or insert
> into the database. I'm using MYSQL and each field is specified as a boolean.
>
> How could I allow each user to come to the view, click on the different
> fields they'd like and have it insert the database. Will it automatically
> create the record for them if they don't have a record associated with
> their id?
>
> 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/d/optout.
>

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

Reply via email to