'collectstatic' command fails when WhiteNoise is enabled

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

    Much like everyone else, I had a unique fix to this problem... turns out I had a url() in my styles.css file with bad syntax.

    Once I changed:

    background-image: url( '../images/futura_front_blank_medium.jpg' );

    to

    background-image: url('../images/futura_front_blank_medium.jpg');

    (notice the subtle difference -- I removed the spaces on either side of the string)

    then python manage.py collectstatic worked fine and I didn't get that error.

提交回复
热议问题