Django Heroku not serving static files when Debug=False

前端 未结 2 1056
别那么骄傲
别那么骄傲 2021-01-07 02:41

I\'m hosting my Django application on Heroku and using whitenoise to handle serving static files.

Following is con

2条回答
  •  悲哀的现实
    2021-01-07 03:33

    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.

提交回复
热议问题