Another file with the target path found - where is this other file?

When I start manage.py collectstaticin Django, I see messages such as:

Found another file with the destination path 'admin/js/jquery.init.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.

I tried running find . -type lDjango to search for symbolic links, but found nothing.

How can I determine where another file with the same destination path is?

+4
source share
2 answers

Like templates, static files are searched in two places:

  • in the directories listed in STATIC_DIRS
  • in static directories in the applications themselves.

In this case, this file seems to be provided both as django/contrib/admin/staticwell as /static/.

+5
source

: https://github.com/django-compressor/django-compressor/issues/720

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    #'django.contrib.staticfiles.finders.AppDirectoriesFinder',    #causes verbose duplicate notifications in django 1.9
)
+3

Source: https://habr.com/ru/post/1630017/


All Articles