Questions like this were asked before, I read them all and tried to understand django's official documentation on this, but I'm still trying to use static files on a virtual server. More specifically, I'm just trying to get my Base.html template to use base.css.
My folder structure is as follows:
manage.py static/CSS/base.css VergeGreenITEvent_Website/settings.py VergeGreenITEvent_Website/views.py ect VergeGreenITEvent_Website/Webpage_Templates/Base.html
(There is currently no application folder, as I followed the “django Book” to learn and did not get to it!)
Full settings.py can be viewed here: http://pastebin.com/JB3mKRcJ
In my Base.html template, I now have the code:
<head> <title>Verge Green IT</title> {% load static %} <link rel="stylesheet" href="{% static "CSS/base.css" %}" type="text/css" /> </head>
CSS is still not applied.
Could you help me figure out what I'm doing wrong? I would be incredibly grateful.
I am using the latest version of Django. (1.4)
urls.py:
from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns import views urlpatterns = patterns('', url(r'^$', views.Home), ) if settings.DEBUG: urlpatterns += staticfiles_urlpatterns()
Holly source share