Il 30/08/16 21:40, Niphlod ha scritto:
> +1 for Dave .
>
> with isempty() in a model you're executing a query for each and every
> request for absolutely NO REASON.

I usually create a script directory and put there scripts with commands
to be performed only once, such in the case of pre-populating or more in
general of application initialization with the sintax:

$ python web2py.py -S myapp -M -R applications/myapp/scripts/myscript.py

in case of model is not needed (and it's not the case of pre-population)
you can even not use the -M option.

Do you think it could be a good way to suggest?

Cheers


    Manuele

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to