[Django]-Django Heroku not serving static files when Debug=False

11👍

Got the solution from a post

Added collectstatic to Procfile

web: python manage.py collectstatic --no-input; gunicorn myapp.wsgi --log-file - --log-level debug

And now every static file is serving including, CSS, js, images and videos.

1👍

The Whitenoise middleware should come after the security middleware and before all other middleware. You are currently adding it to the end.

Leave a comment