On Tue, Jan 20, 2009 at 4:36 PM, mdipierro <mdipie...@cs.depaul.edu> 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 >
Where does this go? > > group_id=auth.add_group(role='Manager') > auth.add_membership(group_id,auth.user.id) > auth.add_permission(group_id,'select','[app]_user') I get: auth.add_membership(group_id,auth.user.id) AttributeError: 'NoneType' object has no attribute 'id' so i've put it in the wrong place (db.py right now - should it go in a controller page?) Seems to work now that I put it in: controllers/default.py def index(): group_id=auth.add_group(role='Manager') auth.add_membership(group_id,auth.user.id) auth.add_permission(group_id,'select','tnew_user') response.flash=T('Welcome to web2py') return dict(message=T('Hello World')) -wj --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---