Also, see http://web2py.com/book/default/chapter/08#Authentication and 
http://web2py.com/book/default/chapter/08#Customizing-Auth.

On Friday, March 25, 2011 9:12:46 AM UTC-4, Massimo Di Pierro wrote:

> yes. in models/db.py 
>
> fron gluon.tools import * # including Auth 
> auth = Auth(globals(),db) 
> auth.define_tables() 
>
> On Mar 25, 7:02 am, villas <[email protected]> wrote: 
> > It is not so obvious from the name,  but the Auth class is in gluon/ 
> > tools.py 
> > 
> > On Mar 25, 10:24 am, coderbuzz <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Hi, starting learn web2py... and confusing on first sign. 
> > 
> > > What I have do? 
> > > 1. Create new application via web intf, name it  'init' so it will be 
> > > default 
> > > 2. Clear views/index.html and just leave: 
> > > {{=BEAUTIFY(response._vars)}} to inspect the params (make me clear) 
> > > 3. Entering this:http://127.0.0.1:8000/init/default/user/login 
> > > totally CONFUSING me since I cannot find the implementation of auth() 
> > > ---> where is??? no import file I could track. Netbeans fail find its 
> > > declaration. 
> > 
> > > def user(): 
> > >     """ 
> > >     exposes: 
> > >    http://..../[app]/default/user/login 
> > >    http://..../[app]/default/user/logout 
> > >    http://..../[app]/default/user/register 
> > >    http://..../[app]/default/user/profile 
> > >    http://..../[app]/default/user/retrieve_password 
> > >    http://..../[app]/default/user/change_password 
> > >     use @auth.requires_login() 
> > >         @auth.requires_membership('group name') 
> > >         @auth.requires_permission('read','table name',record_id) 
> > >     to decorate functions that need access control 
> > >     """ 
> > >     return dict(form=auth()) --> where is??? 
> > 
> > > How create my own user data & its authentication? 
> > > Where is user table model? could not find it on models/db.py 
> > 
> > > Any insight will be appreciated 
> > > Thanks

Reply via email to