need some help in serving static files inside a wsgi apps

Tool69 kibleur.christophe at gmail.com
Sat May 24 09:28:06 EDT 2008


Hi,

Until now, I was running my own static site with Python, but I'm in
need of dynamism.

After reading some cgi tutorials, I saw Joe Gregorio's old article
"Why so many Python web frameworks?" about wsgi apps [http://
bitworking.org/news/Why_so_many_Python_web_frameworks] and have a
question about it. The code he gave works like a charm (I had to make
a little change because SQLAlchemy has changed since), but how the
hell can I serve static files (css, js, images, etc.) within an wsgi
app, ie inside a '/static' directory ?!

Sorry if my question is a stupid one, but I cannot find an easy way to
do this. Each tutorial I'm reading out there does not talk about them
at all. All of my python books didn't mention wsgi either.

I know I could use web.py, web2py, Cherrypy, Django, Pylons, etc. but
I'm trying to understand basics of web dev. from their roots.

thanks in advance for any advice ,

Kib.



More information about the Python-list mailing list