no. they are run at every request but overhead is neglibible

On Aug 25, 11:55 am, Antti <[email protected]> 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 <[email protected]> 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 no group exists:
> >     create missing groups and permissions
>
> > Massimo
>
> > On Aug 24, 7:14 am, Antti <[email protected]> wrote:
>
> > > Hi,
>
> > > What's the best practice in adding default groups and permissions for
> > > apps?
>
> > > Should I write a script which would add groups and permissions if they
> > > do not exist? And how to trigger it?
>
> > > cheers,
> > > Antti

Reply via email to