I'm a Python noob. When the web server is Apache and the language is PHP, I can use $_SERVER['HTTP_HOST']. Foster For Life is using maps4all (see my fork at http://github.com/dscotese/maps4all) and I'm the developer. We want to deploy instances of this app for several locations, and it seems the best way to do it is to use the same app for all of them. If we decide that each location should have it's own top level folder (resourcemap.org/location1, resourcemap.org/location2, etc.), then I would want the app to use the top level folder (location1, location2, etc.) in the database queries. How would I get it?
I found this tutorial but then I printed out ALL 26 items in the _Environ (os.environ.items()) and none of their values contains the part of the URL I'm looking for (I visited http://localhost:5000/local%20dir and looking for something identifying the URI, the path, or something that has "local" in it (which I'd expect to also have the %20dir part). It's not there. Where is it?