title: Linking up CSS (and static files in general) to html in Django
body: <p>My html file isn't reading my css file - I've tried searching for all related questions on this issue, but still can't get the css file to be read. Here's what I have:</p>
  
  <p>settings.py</p>
  
  <pre><code>import os
  import os.path
  
  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/'
  
  STATIC_ROOT = os.path.join(BASE_DIR, "form/static")
  )
  </code></pre>
  
  <p>Beginning of index.html</p>
  
  <pre><code>{% load staticfiles %}
  &lt;!DOCTYPE html&gt;
  &lt;html leng="en"&gt;
      &lt;head&gt;
          &lt;title&gt;Test&lt;/title&gt;
  
          &lt;link rel="stylesheet" 
         href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt;
          &lt;link rel="stylesheet" 
         href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-
          theme.min.css"&gt;
          &lt;link rel="stylesheet" href="{% static 'css/main.css' %}" /&gt;
          &lt;/head&gt;
  </code></pre>
  
  <p>My "static" and "templates" folder are on the same level, and main.css is at static/css/main.css</p>
  
  <p>Edit:
  If it helps, my bootstrap links are being recognized, only main.css is not. </p>
  
  <p>Update:
  Removed STATICFILES_DIRS from settings.py and added STATIC_ROOT = os.path.join(BASE_DIR, "form/static") as above.</p>
  
  <p>My file structure:</p>
  
  <pre><code>app
    app
    - settings.py
    form
    - static
      - css
        - main.css
    - templates
      - form
        - index.html
  </code></pre>