Whitenoise, Mezzanine, Django -ImportError: cannot import name ManifestStaticFilesStorage
<p>I am trying to deploy my mezzanine project on heroku. The last error gives me an ultimate stack- ImportError: cannot import name ManifestStaticFilesStorage. Here is my core project structure:</p>

<pre><code>âââ deploy
âÂ Â  âââ crontab
âÂ Â  âââ gunicorn.conf.py.template
âÂ Â  âââ local_settings.py.template
âÂ Â  âââ nginx.conf
âÂ Â  âââ supervisor.conf
âââ dev.db
âââ fabfile.py
âââ flat
âÂ Â  âââ admin.py
âÂ Â  âââ admin.pyc
âÂ Â  âââ __init__.py
âÂ Â  âââ __init__.pyc
âÂ Â  âââ models.py
âÂ Â  âââ models.pyc
âÂ Â  âââ tests.py
âÂ Â  âââ views.py
âÂ Â  âââ views.pyc
âââ __init__.py
âââ __init__.pyc
âââ manage.py
âââ Procfile
âââ README.md
âââ requirements.txt
âââ runtime.txt
âââ settings.py
âââ staticfiles -&gt; mezzanine_heroku/staticfiles
âââ urls.py
âââ urls.pyc
âââ wsgi.py
</code></pre>

<p>wsgi.py:</p>

<pre><code>import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise

application = get_wsgi_application()
application = DjangoWhiteNoise(application)
</code></pre>

<p>Procfile:</p>

<pre><code>web: gunicorn wsgi
</code></pre>

<p>Traceback from heroku-logs:</p>

<pre><code>ImportError: cannot import name ManifestStaticFilesStorage

2016-09-02T18:02:36.124458+00:00 app[web.1]: Traceback (most recent call last):
2016-09-02T18:02:36.124494+00:00 app[web.1]:   File "/app/.heroku/python/bin/gunicorn", line 11, in &lt;module&gt;
2016-09-02T18:02:36.124529+00:00 app[web.1]:     sys.exit(run())
2016-09-02T18:02:36.124558+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2016-09-02T18:02:36.124620+00:00 app[web.1]:     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2016-09-02T18:02:36.124646+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 192, in run
2016-09-02T18:02:36.124706+00:00 app[web.1]:     super(Application, self).run()
2016-09-02T18:02:36.124709+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2016-09-02T18:02:36.124754+00:00 app[web.1]:     Arbiter(self).run()
2016-09-02T18:02:36.124800+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 218, in run
2016-09-02T18:02:36.124858+00:00 app[web.1]:     self.halt(reason=inst.reason, exit_status=inst.exit_status)
2016-09-02T18:02:36.124862+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 331, in halt
2016-09-02T18:02:36.124962+00:00 app[web.1]:     self.stop()
2016-09-02T18:02:36.124966+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 381, in stop
2016-09-02T18:02:36.125047+00:00 app[web.1]:     time.sleep(0.1)
2016-09-02T18:02:36.125057+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 231, in handle_chld
2016-09-02T18:02:36.125138+00:00 app[web.1]:     self.reap_workers()
2016-09-02T18:02:36.125141+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 506, in reap_workers
2016-09-02T18:02:36.125241+00:00 app[web.1]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2016-09-02T18:02:36.125304+00:00 app[web.1]: gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt;
2016-09-02T18:02:36.182785+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-02T18:02:36.175782+00:00 heroku[web.1]: Process exited with status 1
</code></pre>

<p>Most confusing is  the <code>ImportError: cannot import name ManifestStaticFilesStorage</code> error.</p>

<p>ManifestStaticFilesStorage was introduced in Django 1.7. Are you using an older version of Django? If so, you should upgrade to a <a href="https://www.djangoproject.com/download/#supported-versions" rel="nofollow">supported version</a>.</p>

<p>It's still possible to use <a href="http://whitenoise.evans.io/en/legacy-2.x/" rel="nofollow">WhiteNoise 2.0.6</a> with older versions of Django, but this is not supported by either me or the Django team.</p>

python django heroku gunicorn mezzanine