Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing static files with the django virtual server
    primarykey
    data
    text
    <p>Questions exactly like this have been asked before, i've read them all and tried to make sense of the official django documentation on the subject but i'm still struggling to use static files on the virtual server. More specifically i'm just trying to get my template, <code>Base.html</code>, to use <code>base.css.</code> </p> <p>My folder structure looks like this: </p> <pre><code>manage.py static/CSS/base.css VergeGreenITEvent_Website/settings.py VergeGreenITEvent_Website/views.py ect VergeGreenITEvent_Website/Webpage_Templates/Base.html </code></pre> <p>(no app folder at the moment, as I was following "The django book" to learn and hadn't gotten to that bit!)</p> <p><strong>The complete settings.py can be viewed here: <a href="http://pastebin.com/JB3mKRcJ" rel="nofollow noreferrer">http://pastebin.com/JB3mKRcJ</a></strong></p> <p>In my Base.html template I now have the code:</p> <pre><code>&lt;head&gt; &lt;title&gt;Verge Green IT&lt;/title&gt; {% load static %} &lt;link rel="stylesheet" href="{% static "CSS/base.css" %}" type="text/css" /&gt; &lt;/head&gt; </code></pre> <p>CSS still isn't being applied.<img src="https://i.stack.imgur.com/t7WoH.png" alt="enter image description here"> Could you help me figure out what i'm doing wrong? I'd be incredibly grateful.</p> <p>I'm using the latest version of Django. (1.4)</p> <hr> <p>urls.py :</p> <pre><code>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() #this serves static files and media files. #in case media is not served correctly urlpatterns += patterns('', url(r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }), ) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload