title: Issue with Static Django files on Heroku
body: <p>I have deployed by Django project as a Heroku app, but can not get the static files to work.</p>
  
  <p>settings.py</p>
  
  <pre><code># Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/1.9/howto/static-files/
  
  PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
  
  STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
  STATIC_URL = 'static/'
  
  # Extra places for collectstatic to find static files.
  STATICFILES_DIRS = (
      os.path.join(PROJECT_ROOT, 'static'),
  )
  </code></pre>
  
  <p>which is exactly what is recommended at <a href="https://devcenter.heroku.com/articles/django-assets" rel="nofollow noreferrer">Django and Static Assets</a></p>
  
  <p>I have set DISABLE_COLLECTSTATIC to false with,</p>
  
  <pre><code>$ heroku config:set DISABLE_COLLECTSTATIC=0 --app mathsproject
  </code></pre>
  
  <p>The file system looks like this,</p>
  
  <p><a href="https://i.stack.imgur.com/qhHQl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qhHQl.png" alt="enter image description here"></a></p>
  
  <p>which shows that the 'static' directory is in the root of my Django project. But I do not see where the 'staticfiles' directory is? Should this be created somewhere?</p>
  
  <p>When running,</p>
  
  <p>$ heroku logs</p>
  
  <p>I typically get errors showing that the static files are missing. And this is obvious in the browser too.</p>
  
  <pre><code>......
  2016-07-11T07:39:30.187273+00:00 app[web.1]: Not Found: /static/assets/js/jquery-1.10.2.min.js
      2016-07-11T07:39:30.264037+00:00 app[web.1]: Not Found: /static/assets/img/4.png
      2016-07-11T07:39:30.283627+00:00 app[web.1]: Not Found: /static/assets/img/testimonials/1.jpg
  ........
  </code></pre>
  
  <p>Whitenoise has been enabled by adding, to mathProject/wsgi.py</p>
  
  <pre><code>import os
  
  from django.core.wsgi import get_wsgi_application
  
  from whitenoise.django import DjangoWhiteNoise
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mathsProject.settings")
  
  application = get_wsgi_application()
  
  application = DjangoWhiteNoise(application)
  </code></pre>
  
  <p>To the bottom of settings.py I put</p>
  
  <pre><code>STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
  </code></pre>
  
  <p>Running</p>
  
  <pre><code>$ heroku run bash
  </code></pre>
  
  <p>and then,</p>
  
  <pre><code>$ python manange.py collectstatic --noinput
  </code></pre>
  
  <p>this gives several lines of errors, the last of which is,</p>
  
  <pre><code>OSError: [Errno 2] No such file or directory: '/app/mathsProject/static'
  </code></pre>
  
  <p>But there is a 'static' directory in 'mathsProject'</p>
  
  <p>Thanks,</p>