开发者

Django static files in an egg file

开发者 https://www.devze.com 2023-03-24 16:52 出处:网络
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 fi

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

精彩评论

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