I\'m trying to follow these instructions to enable static files in my Django project. I have
STATIC_URL = \'/static/\'
in my settings.py file.
I can suggest a couple things to check:
In my projects at least, the static folder is in the app directory, not the project directory. For example, mysite/myapp/static/myapp/img.jpg
rather than mysite/static/mysite/img.jpg
. Your project might not be looking in the right place.
Make sure that {% load staticfiles %} is in your html template before linking the files.
When you link a file in your html template, rather than direct urls like
use
This was enough to get static files working in my projects, without having to modify urls.py or manually set PROJECT_ROOT or STATICFILES_DIRS.