title: Implementing CSS in Django
body: <p>I'm trying to implement a simple CSS file to my python web app. When I try loding the app, I get a error message in the command prompt that says:</p>
  <pre><code>&quot;GET /static/css/default.css HTTP/1.1&quot; 404 1658
  </code></pre>
  <p>And of course no CSS is implemented to the HTML page. The structure of my Project is:</p>
  <pre><code>ProjectName
   MyApp
   MyTeachingApp
    static
     css
      default.css
   templates
    page.html
  </code></pre>
  <p>In my <code>settings.py</code>, I got:</p>
  <pre><code>BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  INSTALLED_APPS = [
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  ]
  STATIC_URL = '/static/'
  </code></pre>
  <p>And in the html I got the link tag inside the head like:</p>
  <pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;{% static &quot;css/default.css&quot; %}&quot; /&gt;
  </code></pre>
  <p>How do I correctly implement the CSS in my web app? Do I've to add something to the <code>url.py</code>? Or is it in the settings.py using the <code>STATIC_ROOT</code> or <code>STATICFILES_DIRS</code>?</p>
  <p>I'm using Django 1.9.</p>
  <p>My <code>urls.py</code> file contains the following code:</p>
  <pre><code>    from django.conf.urls import url, include
  from django.contrib import admin
  from django.views import *
  from django.conf import settings
  from django.conf.urls.static import static
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^caesarTemp/', include('TeachingTool.urls')),
  ] + static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)
  </code></pre>
  <p>This is the <code>urls.py</code> inside the <code>MyApp</code> folder.</p>
  <p>I have an extra <code>urls.py</code> file inside a <code>MyTeachingApp</code> folder that contains:</p>
  <pre><code>    from django.conf.urls import url
  from . import views
  urlpatterns = [
      url(r'^$', views.printAlphabet, name = 'print'),
  ]
  </code></pre>
  <p>I tried adding the static statement to this <code>urls.py</code> file and still didn't work.</p>