yes but only so that you can test them and provide feedback. I hope to
finalize the APIs and documentations within the week.

also I would like to change the name of the file from utils.py to
something more catchy. Any suggestion?

Massimo

On Jan 21, 1:33 am, David Marko <[email protected]> wrote:
> These things look very nice.
> Does it mean that described changes are available in svn trunk
> version?
>
> David
>
> On 21 Led, 00:36, mdipierro <[email protected]> wrote:
>
> > I have a preliminary version of inclusion if T2 functionality into
> > web2py core. I am not yet promising backward compatibility here. The
> > module name many change. For now it is in trunk as gluon/utils.py
>
> > Here is how you use it (assuming [app] is you application name).
>
> > 1) put this in your model
>
> > from gluon.utils import *
> > auth=Auth(globals(),db)
> > auth.define_tables()
> > crud=Crud(globals(),db)
>
> > 2) put this in your "default" controller
>
> > def user(): return dict(form=auth())
> > def database(): return dict(form=crud())
> > def download(): return response.download()
>
> > def index():
> >     response.flash=T('Welcome to web2py')
> >     return dict(message=T('Hello World'))
>
> > Now 
> > visit:http://..../[app]/default/user/registerhttp://..../[app]/default/user/loginhttp://..../[app]/default/user/profilehttp://..../[app]/default/user/change_passwordhttp://..../[app]/default/user/groupshttp://..../[app]/default/user/logouthttp://..../[app]/default/user/retrieve_password
>
> >http://..../[app]/default/database/tableshttp://..../[app]/default/database/select/[app]_eventhttp://..../[app]/default/database/create/[app]_eventhttp://..../[app]/default/database/read/[app]_event/1http://..../[app]/default/database/update/[app]_event/1http://..../[app]/default/database/delete/[app]_event/1
>
> > now add to the model
>
> > mail=Mail()
> > mail.settings.server='smtp.whetever.com'
> > mail.settings.sender='[email protected]'
> > mail.settings.longin='username:password'
> > auth.settings.mail=mail
>
> > so that registration requires email verification
>
> > then add
>
> > auth.settings.captcha=RECAPTCHA
> > (request,public_key='RECAPTCHA_PUBLIC_KEY',private_key='RECAPTCHA_PRIVATE_K 
> > EY')
>
> > so that registration will use recaptcha
>
> > then add
>
> > crud.auth=auth
>
> > so that crud will enforce role based access control....
>
> > now you lost the permission to accesshttp://.../database/....
>
> > now give yourself back permission *only* to select record in table
> > [app]_user
>
> > group_id=auth.add_group(role='Manager')
> > auth.add_membership(group_id,auth.user.id)
> > auth.add_permission(group_id,'select','[app]_user')
>
> > or to delete users
>
> > auth.add_permission(group_id,'delete','[app]_user')
>
> > get the idea?.... I think I have been following (or tried to) the
> > advice of some of the members here like Yarko, Ceej, Bill, Fran, and
> > others.
>
> > There is a lot more stuff in there (like decorators that enforce
> > permissions) that needs polishing and documenting.
>
> > Volunteers to help?
>
> > Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to