I have several CSS files listed in my base.html, and while one of them is loaded, everything else isn't, nor the javascript or images.
The following is a portion of base.html:
<html>
<head>
<link href="/media/css/base.css" rel="stylesheet" type="text/css"/>
<link href="/media/css/home.css" rel="stylesheet" type="text/css"/>
<link href="/media/css/slideshow.css" rel="stylesheet" type="text/css"/>
<link href="/media/css/demos.css" rel="stylesheet" type="text/css"/>
...
with media being the folder in the base directory that contains the static files. When viewing the source of the page produced, base.css
loads fine, but for everything else, I get Page not found: [Name of CSS file here]
. As far as I can tell, there isn't any difference between base.css and home.css; the folder location, the file permissions...I just can't figure out why it can find one file and not the rest. Does anyone have any ideas what might be going on?
Settings.py
ROOT_DIR = os.path.abspath("")
ROOT_URL = 'http://url that will be used for running product/'
MEDIA_ROOT = ROOT_DIR + 'media/'
MEDIA_URL = ROOT_URL + 'media/'
urls.py
urlpatterns += patterns('django.views',
url(r'^media/css/(?P<path>.*)$', 'static.serve',
{'document_root': ROOT_DIR + 'media/css/'}, name='css-root'),
(r'^media/images/(?P<path>.*)$', 'static.serve',
{'document_root': ROOT_DIR + 'media/images/'}),
(r'^media/scripts/(?P<path>.*)$', 'static.serve',
{'document_root': ROOT_DIR + 'media/script/'}),
)