'collectstatic' command fails when WhiteNoise is enabled

前端 未结 14 1019
别那么骄傲
别那么骄傲 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:21

    For me the fix was simply adding a 'static' folder to the top directory (myapp/static did the trick). If you are setting the STATIC_URL but don't have that directory already created, it will throw an error, even though you aren't using that directory for your static files with whitenoise.

    STATIC_URL = '/static/'
    

提交回复
热议问题