Dynamically creating mappings to subapplications.

19 views
Skip to first unread message

Dolf Andringa

unread,
Mar 31, 2015, 6:40:33 AM3/31/15
to we...@googlegroups.com
Hey all,

I would like in my main app to create mappings dynamically to subapplications. Basically the user specifies a parameter and the value of that parameter determines the behaviour of the subapplication.
So my question is, how would I go around adding a base url and subapplication dynamically to my running application?
Cheers,

Dolf.

Dolf Andringa

unread,
Apr 4, 2015, 5:09:59 AM4/4/15
to we...@googlegroups.com
I figured out that I need application.add_mapping by now. But am still running into trouble with this. With the built-in webserver web.debug=False needs to be set, which works, but I am running my application using apache and mod_wsgi. There in needed to add autoreload=False as argument in the application() call, but still I am sometimes getting 404 not found errors when calling a url that I added with add_mapping. When I refresh the browser a few times I do get the correct page. I am running google chrome and connect to a local (in the same subnet) webserver without proxies or any other caching services in there. 
The application does seem to run fine when I run it standalone with the built-in webserver.

Could there be a problem with Threading or something where the add_mapping call doesn't take effect in a different thread?

Cheers,

Dolf.
Reply all
Reply to author
Forward
0 new messages