I am developing a Django site and after a series of edits I ran my server again when suddenly - no css! The server still displays the html site, of course, but the css all across the site is throwing a 404 error. My static files information in my settings.py
wasn't edited at all:
import os
# hack to accommodate Windows
CURRENT_PATH = os.path.abspath(os.path.dirname(__file__).decode('utf-8')).replace('\\', '/')
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
os.path.join(CURRENT_PATH, 'static'),
)
My base template does a simple call for the file based on the static file directory:
<link rel="Stylesheet" type="text/css" href="{{ STATIC_URL }}css.css" />
And lastly, of course, here is a quick breakdown of my pertinent directory structure, since I suspect the error is some kind of directory issue:
-project-
settings.py
-static-
css.css
-templates-
base.html
index.html
I've only provided the location of index.html, but the templates folder of course is filled with directories for various templates/pages.
I'll keep this question updated with information as I troubleshoot/receive answers.