hi, anthony, thank you so much for your detail explaination, right now, i use appadmin, i think there is another way to put it on a code like on sql script.
best regards, steve van christie On Thu, Apr 14, 2011 at 11:33 PM, Anthony <[email protected]> wrote: > Your model files are run on every request, so you shouldn't put any > one-time code in a model file. The easiest way to do this would be manually > via appadmin (see > http://web2py.com/book/default/chapter/03#More-on-appadmin). You could > also do it from a web2py shell or by putting the code in a Python script > file and executing the file with web2py command line options (see > http://web2py.com/book/default/chapter/04#Command-Line-Options, in > particular, the -S and -R options). > > Anthony > > On Thursday, April 14, 2011 11:54:17 AM UTC-4, 黄祥 wrote: > >> hi, >> >> is there possible to insert the data auth_group during database >> creation for the first time? >> e.g. >> db.auth_group.insert(role = "Admin", description = "Admin") >> >> i've already tried to put it on models but, the data inserted is >> repeated many times. >> >> any idea, suggestion or correction? >> >> thanks and best regards, >> >> steve van christie > >

