{{STATIC_URL}} was deprecated (I think) so that it might only show css/main.css .
I suggest you configure it as follows:
settings.py
import os.path PWD = os.path.dirname(os.path.realpath(__file__))
base.html
{% load static %} <link rel="stylesheet" href="{% static 'css/main.css' %}">
Thus, you can use relative paths in your settings and avoid breaking settings if you move the entire project outside of your home directory.
You can use it for each path parameter, for example LOCALE_PATHS or TEMPLATE_DIRS .
If this does not work, make sure that you have the following settings:
STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) # optional but if you defined it be sure to have this one: TEMPLATE_CONTEXT_PROCESSORS = ( # ... 'django.core.context_processors.static', # ... )
source share