'collectstatic' command fails when WhiteNoise is enabled

前端 未结 14 1024
别那么骄傲
别那么骄傲 2020-12-08 19:51

I\'m trying to serve static files through WhiteNoise as per Heroku\'s recommendation. When I run collectstatic in my development environment, this happens:

14条回答
  •  情书的邮戳
    2020-12-08 20:26

    I had similar problem, but with a twist.

    I deployed on pythonanywhere. If I turn debug True, app runs fine. But if a turn debug False, app crashes with a error that with one line being the summary

    ValueError: Missing staticfiles manifest entry for 'favicons/favicon.ico'

    I changed from STATIC_ROOT = 'staticfiles to STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

    Deleted staticfiles directory, then rerun python manage.py collectstatic.

    Now app runs fine

提交回复
热议问题