Django doesn't serve static content, is this a major downer or what?
Hi, I'm a long time rails users. I started looking at django a couple of days ago, went through a lot of the simple stuff and really loved how everything worked. The admin is really great in Django and way surpasses what is offered in rails in that regard.
However, when I actually started to work on serving complex webpages. I discovered that DJANGO DOES NOT SERVE STATIC CONTENT. This includes css | js | img files. Even in development mode, you have to create a hack around to do this.
In rails, this would have being a simple placement in the public folder. I feel the lack of this feature is something no modern web framework should have. Do you think a webserver should include the ability to serve static content?
6 comments
[ 4.4 ms ] story [ 11.4 ms ] threadPoint apache or whatever traditional web server, which is really good at serving static ocntent in an efficient manner, at it and be done with it.
To answer your question: No, I don't think serving static content should be something your web framework does. It sounds inefficient and less flexible to me. For example, if I have a web server in front of the framework, I have more control over caching and load balancing.
and, not everyone wants to run apache or nginx or lighty on their dev machines.
Here's how to do it:
Drop that in to your 'settings.py' and you should be fine.