[Django]-Django StaticFiles APP and Wsgi

1đź‘Ť

âś…

No way of having some kind of overriding like django does with WSGI..

there’s great command in django “manage.py collectstatic” which places all files from STATIC_DIR list (in settings.py) to main static directory.. in fact this commands just copy files from all those dir’s and that’s it =)

Would be great to know, how could I make this copying automatic when any file in that dir would be updated.. same thing like monitor.py for automatic wsgi reload when source is modified…

👤holms

2đź‘Ť

There is lots of documentation on the official mod_wsgi site for understanding how to use it. This includes how to set it up for serving static media files. See:

http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines

1đź‘Ť

WSGI has nothing whatever to do with serving static files. This is all clearly covered in the Django deployment documentation – as Torsten suggests in the comments, you’ll need to point Apache at your static files, probably via an alias.

I must say though that this project looks very dodgy. Manually adding a load of eggs to sys.path is not the right way to go about things – a much better way would be to use something like virtualenv, which manages all that for you.

Leave a comment