static files not detected Django 1.10
<p><strong>Problem</strong>: javascript and css files doesn't load.<br>
I am using Django 1.10, my
<code>settings.py</code> file looks like this:</p>

<pre><code>STATIC_URL = "/static/"

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static")
]

STATIC_ROOT = os.path.join(BASE_DIR, "static_root")
</code></pre>

<p>I have my static files in the <code>static folder</code> and also have a static root, still the <code>js</code>, <code>css</code> not working<br>Why?</p>

<p>You need to specify it in <code>urls.py</code> file as well</p>

<pre><code># need these two additional imports
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
  ...
]

# add this extra line of code
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
</code></pre>

<p>Have you done that?</p>

python django