title: Django Static Url Error, Not Loading
body: <p>I'm currently mad at Django (1.9) right now! The saddest thing is 'Static URL' is the one giving me problem. 'Media URL' is working fine, no problem, but the static url is giving a huge headache.</p>
  
  <p>in my settings_dev.py</p>
  
  <pre><code>import os
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))  
  STATIC_ROOT = os.path.join(PROJECT_PATH,'../static/')
  STATIC_URL = '/static/'
  </code></pre>
  
  <p>when I add the below tag:</p>
  
  <pre><code>{% load static from staticfiles %}
  
    &lt;script type="text/javascript" src="{% static 'datepicker/js/bootstrap-datepicker.js' %}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The js file won't load. when I check my source code, it will display the below link.</p>
  
  <pre><code>   &lt;script type="text/javascript" src="/static/datepicker/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And when I click it will redirect me to </p>
  
  <pre><code>  http://127.0.0.1:8000/static/datepicker/js/bootstrap-datepicker.js
  </code></pre>
  
  <p>And display </p>
  
  <pre><code>  Page not found (404)
    Request Method:   GET
    Request URL:  http://127.0.0.1:8000/static/datepicker/js/bootstrap-  datepicker.js
  </code></pre>
  
  <p>Now, I adjusted my urls.py to</p>
  
  <pre><code>if settings_dev.DEBUG:
      # static files (images, css, javascript, etc.)
      urlpatterns += patterns('',
          (r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {
      'document_root': settings_dev.MEDIA_ROOT, 'show_indexes': True}),
          (r'^static/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {
      'document_root': settings_dev.STATIC_ROOT, 'show_indexes': True}),
   )
  </code></pre>
  
  <p>Yet, I'm still getting the same error!! Page not found issues.</p>
  
  <p>Project Directory</p>
  
  <pre><code>PROJECT NAME: Book/
  
  SUB DIRECTORY: 
    media
    static
    Template
    book
    bookapp
    manage.py (this is a file)
  </code></pre>
  
  <p>What am I missing?</p>