title: Why can't I get my static dir to work with django 1.3?
body: <p>This problem is very simple, but I just can't figure it out</p>
  
  <p>added to my urlpatterns</p>
  
  <pre><code>url(r'^static/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': '/home/user/www/site/static'})
  </code></pre>
  
  <p>where my main.css is : /home/user/www/site/static/css/main.css</p>
  
  <p>when I access <a href="http://localhost:8000/static/" rel="noreferrer">http://localhost:8000/static/</a></p>
  
  <p>I get: 404: Directory indexes are not allowed here.</p>
  
  <p>when I access <a href="http://localhost:8000/static/css/main.css" rel="noreferrer">http://localhost:8000/static/css/main.css</a></p>
  
  <p>I get: 404: 'css/main.css' could not be found</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Fixed it:</p>
  
  <pre><code>url(r'^static/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT } ),
  </code></pre>
  
  <p>in settings.py</p>
  
  <pre><code># Absolute path to the directory static files should be collected to.
  # Don't put anything in this directory yourself; store your static files
  # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  # Example: "/home/media/media.lawrence.com/static/"
  STATIC_ROOT = os.path.join(CURRENT_PATH, 'static') #=='/home/user/www/site/static'
  
  # URL prefix for static files.
  # Example: "http://media.lawrence.com/static/"
  STATIC_URL = '/mystatic/'
  </code></pre>
  
  <p>As you can see the only thing I really changed was from STATIC_URL = '/static/' to STATIC_URL = '/mystatic/'</p>
  
  <p>note: when I got to <a href="http://localhost:8000/mystatic" rel="noreferrer">http://localhost:8000/mystatic</a>... I get the same errors as above</p>
  
  <p>I thought that STATIC_URL was supposed to be '/static/' so that you could use {{ STATIC_URL }} in your templates...  I really don't understand why this fix worked and why I had to make the change that I did....</p>
  
  <p>Why does this work?</p>