Re: [flask] Chaining Apps
- From:
- Armin Ronacher
- Date:
- 2011-02-15 @ 17:03
Hi,
On 2/15/11 2:22 PM, Florian Ludwig wrote:
> is it possible to mount on app into another flask app?
No, because it's not clear what information would have to be shared and
what not (think config, session, cookies etc.). However you can nicely
mount them into a new WSGI application by using
werkzeug.wsgi.DispatcherMiddleware:
from werkzeug.wsgi import DispatcherMiddleware
from app1 import app as app1
from app2 import app as app2
app = DispatcherMiddleware(app1, {
'/app2': app2
})
Regards,
Armin