WhiteNoise configuration is incompatible 'Heroku'

173 views
Skip to first unread message

omar ahmed

unread,
May 31, 2019, 4:50:50 PM5/31/19
to Django users
hii .. I deployed one Django project on Heroku.The project was running on my local server .. but it doesn't appear good on heroku
i typed : git add . then git commit -am "Implement database connection" then git push heroku master it as result
....
remote: -----> $ python manage.py collectstatic --noinput
remote:        119 static files copied to '/tmp/build_0838ade65ccacd5bcbe3b7ce7f5e5049/staticfiles', 3 unmodified, 286 post-processed.
......
so i go to app directory and typed :
heroku logs -n 200
2019-05-29T13:09:38.000031+00:00 app[web.1]: ImportError:
2019-05-29T13:09:38.000033+00:00 app[web.1]:
2019-05-29T13:09:38.000034+00:00 app[web.1]: Your WhiteNoise configuration is incompatible with WhiteNoise v4.0
2019-05-29T13:09:38.000036+00:00 app[web.1]: This can be fixed by following the upgrade instructions at:
2019-05-29T13:09:38.000037+00:00 app[web.1]: http://whitenoise.evans.io/en/stable/changelog.html#v4-0
and in requirements.txt like :
dj-database-url==0.5.0
Django==2.2.1
django-heroku==0.3.1
django-social-share==1.3.2
gunicorn==19.9.0
Pillow==6.0.0
psycopg2==2.8.2
pytz==2019.1
sqlparse==0.3.0
whitenoise==4.1.2

and this is my settings
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)


i searched but i didn't find solution
thanks in advance
Reply all
Reply to author
Forward
0 new messages