It can be more efficient because the modules only have to be read in once 
upon first import, and you can then easily import and define just the 
models you need for a given request. By default, all model files are read 
and executed on every request. Model files can be executed conditionally, 
but even in that case, the whole file must be read and executed each time. 
On the other hand, it's easier to access the web2py API in model files.

Anthony

On Tuesday, February 4, 2014 5:13:53 PM UTC-5, Ruud Schroen wrote:
>
> I see some applications in web2py appliances that use modules instead of 
> models.
>
> Is there an advantage to this?
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to