django findstatic not looking in every directory

泪湿孤枕 提交于 2020-01-17 07:27:07

问题


findstatic has a strange behaviour :

  1. On localhost

python manage.py findstatic pic/xxx.jpg -v 3 gives me :

Found 'pic/xxx.jpg' here:
  /[...]/myapp/app1/static/pix/xxx.jpg
Looking in the following locations:
  /[...]/myapp/app1/static
  /[...]/myapp/app2/static
  /[...]/myapp/app3/static
  /[...]/env/lib/python3.6/site-packages/django/contrib/admin/static
  1. whereas on production

it gives me

Found 'pic/xxx.jpg' here:
  /[...]/myapp/app1/static/pic/xxx.jpg
Looking in the following locations:
  /[...]/myapp/app1/static
  /[...]/myapp/app2/static
  /[...]/env/lib/python3.6/site-packages/django/contrib/admin/static

(note that the 'app3' directory isn't looked into, despite it exists)

Of course, the files located in the 'app3' directory are not found by findstatic, although they exist.

Does someone have any idea where the problem could come from ? (I don't have any special parameter for staticfiles).

来源:https://stackoverflow.com/questions/41969323/django-findstatic-not-looking-in-every-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!