Before you mark this as a duplicate, I have indeed already looked at the django forums, tutorials, etc.
I have a blog I made with Django, the blog's index page template needs to have a css stylesheet that I have linked in my static folder. (Folder Tree attached attached).
In the html for the template I have the following code:
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'blog/style.css' %}" />
Why is this not working! Thanks!
EDIT: I found this in my sitename/base.py file:
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
STATICFILES_DIRS = [
os.path.join(PROJECT_DIR, 'static'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
Could it be a problem with the directories? manage.py collectstatic -l
says:
196 static files symlinked to '/home/myusername/webapps/mysite/static'.
comment the
STATICFILES_URL [..], STATICFILE_FINDERS [..]
and add the staticfiles_url like this: