django findstatic没有查看每个目录

时间:2017-01-31 23:25:05

标签: django django-staticfiles

findstatic有一种奇怪的行为:

  1. 在localhost上
  2. python manage.py findstatic pic/xxx.jpg -v 3给了我:

    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. 而在制作中
    2. 它给了我

      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
      

      (请注意,“app3”目录不会被查看,尽管它存在)

      当然,findstatic找不到位于'app3'目录中的文件,尽管它们存在。

      有人知道问题可能来自哪里吗? (我没有静态文件的任何特殊参数。)

0 个答案:

没有答案