title: Django: static file not found
body: <p>Running Debian on Virtual Machine guest inside Windows host. Set Bridged for adapter-type. Installed Django on the guest and using build-in <code>runserver</code> and built-in database for testing purposes.</p>
  
  <p>Having simple files structure:</p>
  
  <pre><code>&gt; ..
  &gt; templates
  &gt;   base.html
  &gt; static
  &gt;   css
  &gt;     base.css
  &gt; manage.py
  &gt; setting.py
  &gt; ..
  </code></pre>
  
  <p>File <code>settings.py</code>:</p>
  
  <pre><code>STATIC_URL = '/static/'
  </code></pre>
  
  <p>File <code>base.html</code>:</p>
  
  <pre><code>{% load static %}
  ...   
    &lt;link rel="stylesheet" href="{% static 'css/base.css' %}"&gt;
  </code></pre>
  
  <p>Getting error, not found:</p>
  
  <pre><code>GET http://192.168.XX.XX:8000/static/css/base.css
  </code></pre>
  
  <p><code>Debug</code> in <code>settings.py</code> is set to true (means static files should be surved). The link looks correct. Now why doesn't this work?</p>
  
  <p><strong>Edit:</strong> looks like I forgot to run 'collectstatic'. Here is the output after running it:</p>
  
  <p><a href="https://i.stack.imgur.com/Ud9Jv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ud9Jv.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit2:</strong></p>
  
  <pre><code>EXTERNAL_APPS = [
    ..
    'django.contrib.staticfiles',
  ]
  PROJECT_NAME = 'fooproject'
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  STATIC_ROOT = os.path.join(BASE_DIR, PROJECT_NAME, 'staticfiles')
  STATIC_URL = '/static/'
  </code></pre>