My settings.py
contains the following configuration parameters.
STATIC_ROOT = ''
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
'C:/Users/ABC/Desktop/DBMS/DjangoProject/tvshows',
)
My project's CSS file is located at C:/Users/ABC/Desktop/DBMS/DjangoProject/tvshows/static/default.css
.
I have a mock HTML file that should pull in the CSS content, but the URL is a 404.
<link rel="stylesheet" href="{{ STATIC_URL }}static/default.css" />
What am I doing wrong?
<link rel="stylesheet" href="{{ STATIC_URL }}default.css" />
You need to also edit your urls:
Things to check:
DEBUG = True
in settings.pyurls
use
context processor
orload static
if{{ STATIC_URL }}
isn't working