need some help in serving static files inside a wsgi apps

Diez B. Roggisch deets at nospam.web.de
Sat May 24 10:20:26 EDT 2008


Tool69 schrieb:
> 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 ?!

There is a wsgi-app out there that is called "static". Use that.

And it's the first hit on google "wsgi static"... :)

http://lukearno.com/projects/static/

Diez



More information about the Python-list mailing list