Variations of this question have been asked, but I\'m still unable to get my stylesheets to load correctly when my templates are rendered.
I\'m attempting to serve s
Just thought I'd chime in quickly. While all the propositions here work just fine, and I do use Ty's example while developing, once you hit production you might want to opt to serve files via a straight Apache, or whichever else server you're using.
What I do is I setup a subdomain once I'm done developing, and replace all links to static media. For instance:
<link rel="stylesheet" type="text/css" href="http://static.mydomain.com/css/style.css" />
The reasons for doing this are two-fold. First, it just seems like it would be slower to have Django handle these requests when it's not needed. Second, since most browsers can actually download files simultaneously from 3 different domains, using a second sub-domain for your static files will actually speed up the download speed of your users.