Reputation: 165
So I have the file main.html which is being returned unstyled even though I have style.css in /polls/static/polls/style.css
Here is main.html (cut down for simplicity)
{% load static %}<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="{% static 'polls/style.css' %}">
</head>
my settings.py has this for the static URL:
STATIC_URL = '/static/'
Yet it still returns it unstyled while the console gets returned 404 1671:
"GET /polls/static/polls/style.css HTTP/1.1" 404 1671
The fix is probably easy I'm just a newbie at Django
Thanks
Upvotes: 0
Views: 271
Reputation: 1203
You should add STATICFILES_DIRS
to your settings file. Like this:
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'polls/static')]
Upvotes: 2