why collectstatic won't copy my static files?

前端 未结 7 1964
野的像风
野的像风 2021-02-05 10:07

I have MyApp/static/MyApp directory

When I run ./manage.py collectstatic, I expect the MyApp directory be copied to STATIC_ROOT but it doesn\'t

I have Downloaded

7条回答
  •  無奈伤痛
    2021-02-05 10:29

    One Quick work-around, although this does not fix it or explain WHY it's happening, is to:

    1. go to your project's file directory & rename your project's 'static' folder to something else like 'static-old'
    2. create a new,empty folder called 'static' in your project directory
    3. now if you run python manage.py collectstatic it will see that nothing is in your static folder and will copy ALL static files over.

提交回复
热议问题