It's not clear exactly what you want to make modular, and what elements of 
the system need to be unmodifiable. If you want everything within a given 
application folder inside the /web2py/applications folder to be modifiable 
but need some unmodifiable component to be able to modify the request 
and/or response, you might want to consider WSGI external middleware 
<http://web2py.com/books/default/chapter/29/04/the-core#External-middleware>, 
which is the standard means for wrapping a WSGI application.

But depending on your use case, it might also be sufficient to simply 
include a special model file in the app that sets up the configuration on 
each request -- you just have to ensure that the update mechanism doesn't 
allow that file to be overwritten or deleted.

Anthony

On Saturday, June 18, 2016 at 11:11:25 AM UTC-4, Dominic Mayers wrote:
>
> The use case that I have in mind is that I create a wrapper web2py 
> application over another web2py application that will be updated regularly 
> by a third party. I do not want to have to update the wrapper at each  
> update.  The specific use case that I have in mind is that the wrapper 
> application only sets the location of a configuration file and then calls 
> the actual application, which uses this configuration file.  However, never 
> mind this specific use case, because the objective here is very standard 
> and general - it's the usual concept of modularity: the web2py application 
> is like a module that you can update without having to change the wrapper 
> application.   How can we do that in web2py?    It's perfectly fine if the 
> web2py "application" is not exactly an application as long as it can be 
> edited as an application and just need to be plugged in a simple wrapper 
> application.  This is very easy to do in PHP: you simply include the PHP 
> script. If needed, you reset the current directory before the include.  Is 
> there an equivalent with web2py?  
>

-- 
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/d/optout.

Reply via email to