title: Cannot find static directory in Django app
body: <p>I am a bit of a novice when it comes to Django and Google App Engine, and I've been having trouble setting up project paths in my app settings. Specifically, I'm trying to reference a CSS file for use with a template. My directory structure is as follows:</p>
  
  <pre><code>app/
      app/
          -'__init__'.py
          -settings.py
          -urls.py
          -views.py
          -wsgi.py
  img/
  static/
      css/
          -style.css
  templates/
      -index.html
  </code></pre>
  
  <p>I think my issue lies in the settings based on the work I've been doing for the past few hours. I started being unable to reference a template, though I figured out how to do that, and let me explain how:</p>
  
  <p>In settings.py, I have the following pieces of information regarding templates:</p>
  
  <pre><code>PROJECT_PATH = os.path.abspath(os.path.dirname(__name__))
  
  TEMPLATE_DIRS = (
      PROJECT_PATH + '/templates',
  )
  </code></pre>
  
  <p>This turned out to be simple enough. I set a PROJECT_PATH which holds the path for the project, and appended the templates directory. However, I'm still having trouble with doing the same for static files, and this is where I'm kind of lost. With regard to static files, I have the following in settings:</p>
  
  <pre><code>PROJECT_PATH = os.path.abspath(os.path.dirname(__name__))
  
  STATIC_ROOT = ''
  
  STATIC_URL = '/static/'
  
  STATICFILES_DIRS = (
      PROJECT_PATH + '/static',
  )
  </code></pre>
  
  <p>Theoretically these default values should work fine as long as the directory I'm using is named '/static/' but it doesn't work the same way as templates. I've tried quite a few different things to try to get these values to point to the correct directory, but only one time have I actually been successful, and I think that was a combination of using absolute paths i.e 'Users/username/app/static/css/' which don't make sense once I deploy the project because I am not hosting it on my computer. Also I probably had moved the static directory inside the app subfolder, which should also be unnecessary. What is different with the static files compared to the template files? Why can I use the PROJECT_PATH and append '/static' to achieve the same result as with the templates?</p>
  
  <p>Some other useful information from my project:</p>
  
  <pre><code>app/urls.py:
  
  urlpatterns = patterns(
      '',
      url(r'^$', views.index, name='index'),
  ) + staticfiles_urlpatterns()
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>templates/index.html:
  
  &lt;html&gt;
  
      &lt;head&gt;
          {% load staticfiles %}
          &lt;link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}" /&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;!--Some stuff--&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>app.yaml:
  
  application: siren-1157
  version: 1
  runtime: python27
  api_version: 1
  threadsafe: true
  
  handlers:
  - url: /.*
    script: main.app
  - url: /static
   static_dir: static
  
  libraries:
  - name: django
    version: "latest"
  </code></pre>
  
  <p><strong>EDIT</strong> : Based on some feedback from @AlexMartelli I've added application_readable: true to the app.yaml, in this way:</p>
  
  <pre><code>- url: /static
    static_dir: static
    application_readable: true
  </code></pre>
  
  <p>Some other resources I have used while troubleshooting, with ill effect:</p>
  
  <p><a href="https://stackoverflow.com/questions/7574759/django-cant-get-static-css-files-to-load">Django -- Can&#39;t get static CSS files to load</a>
  <a href="https://docs.djangoproject.com/en/1.4/howto/static-files/#configuring-static-files" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.4/howto/static-files/#configuring-static-files</a>
  <a href="https://github.com/divio/django-shop/blob/master/example/settings.py" rel="nofollow noreferrer">https://github.com/divio/django-shop/blob/master/example/settings.py</a></p>
  
  <p>Some other things I've tried:</p>
  
  <p>Change reference technique in index.html:</p>
  
  <p>from</p>
  
  <pre><code>{% static 'css/style.css'}
  </code></pre>
  
  <p>to</p>
  
  <pre><code>{{ STATIC_URL }}css/style.css
  </code></pre>
  
  <p>Changed PROJECT_PATH with a variety of different os modules</p>
  
  <p>Changed STATIC_ROOT, STATIC_URL, and STATICFILES_DIRS to various different values, from absolute path ('/Users/username/app/static/') to a relative path using PROJECT_PATH or a derivative</p>
  
  <p>Is anyone able to point me in the right direction with figuring out how to set up directories? I feel like I'm close but it's driving me nuts right now.</p>