A note about serving static files with Python's wsgi

Wednesday, 14 October 2015

A note about serving static files with Python's wsgi

The best way to learn how to use python for the web is to make something simple in Flask, revisit the tutorial on how to set stuff up with more than a single file and then graduate to a framework like Pyramid or Django.
Starting vanilla and using wsgi is a different matter as one gets bogged down in stupid things and is not actually didactic. One issue I had was serving static files.


If one wants to serve files from somewhere that is not wsgi/static, one enters a world of hurt. This is what I added to the part where a GET method is processed.

No comments:

Post a comment