[web2py] Re: Setting default groups for app

2010-08-25 Thread mdipierro
no. they are run at every request but overhead is neglibible On Aug 25, 11:55 am, Antti wrote: > Thanks for your answer. I'll probably go for option 2). I suppose > models are run only once upon startup? > > -- > Antti > > On Aug 25, 5:10 pm, mdipierro wrote: > > > You have two options: > > 1) c

[web2py] Re: Setting default groups for app

2010-08-25 Thread Antti
Thanks for your answer. I'll probably go for option 2). I suppose models are run only once upon startup? -- Antti On Aug 25, 5:10 pm, mdipierro wrote: > You have two options: > 1) create a scrpt and run it manually once > > web2py.py -S yourapp -M -N -R script.py > > 2) use a model like: > > if

[web2py] Re: Setting default groups for app

2010-08-25 Thread mdipierro
You have two options: 1) create a scrpt and run it manually once web2py.py -S yourapp -M -N -R script.py 2) use a model like: if no group exists: create missing groups and permissions Massimo On Aug 24, 7:14 am, Antti wrote: > Hi, > > What's the best practice in adding default groups and