Finally, I have another question. In my settings.py file, there is actually no section for TEMPLATE_CONTEXT_PROCESSORS. I have noticed in the documentation
yes.
put this in there:
("django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", "django.core.context_processors.static", "django.core.context_processors.tz", "django.contrib.messages.context_processors.messages")
and try again.
What happens in your template is that {{ STATIC_URL }} is empty because the context processor ""django.core.context_processors.static"" did not put the STATIC_URL into the context. so your path to the file becomes: /view/stylesheet.css instead of /static/stylesheet.css
You have to put the CSS file in a directory called static as mentioned before.
No comments:
Post a Comment