Yes, your model files will be executed upon every request, so you don't want to add the default groups there. The easiest method might be to add groups into the auth_groups table via appadmin (see http://web2py.com/book/default/chapter/03#More-on-appadmin). You can get to appadmin for your application by going to /yourapp/appadmin or by clicking the "database administration" button under "Models" on the application's edit page in the admin interface. Alternatively, you can run your app in an interactive shell via command line arguments (http://web2py.com/book/default/chapter/04#Command-Line-Options) and add the groups programmatically, as explained here: http://web2py.com/book/default/chapter/08#Authorization. You could also put your add_group code in a .py file and run it with your app via the -R command line option. Anthony
On Friday, April 1, 2011 12:06:53 PM UTC-4, Mike wrote: > DISCLAIMER: very new to web2py, read book and building first app... > > I'm having some brain cramps trying to add some default groups. > Basically I need some default groups set-up when I rollout my > application, like Admins, End-Users, Management - when users register > one of us will manually filter them into the right group (this is fine > for our environment). What's the best way to do that? I just made some > add_group lines in my model but it keeps recreating the group role on > every launch and I got a bunch of duplicates. > > Thanks in Advance > > > >

