开发者

Django static files in an egg file

I'm want to deploy my django project as an egg file which I am able to. The problem is when serving static files, how do I setu开发者_运维技巧p apache (using mod_wsgi) to serve content from an egg file, is it possible ?


" is it possible ?" No.

Apache can only serve files. Simple files.

Or -- for non files -- redirect to some other processing like mod_wsgi.

If you want to serve something packed inside a Python egg (really a Zip archive) you should unpack that member into an ordinary file system location.

Python's setup.py has ways to move files from the distribution kit into file system locations.

http://docs.python.org/distutils/setupscript.html#installing-additional-files

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜