diff --git a/src/whitenoise/base.py b/src/whitenoise/base.py index fea128f6..7ab9dcd8 100644 --- a/src/whitenoise/base.py +++ b/src/whitenoise/base.py @@ -153,18 +153,21 @@ def find_file(self, url): if settings.DEBUG and url.startswith(settings.STATIC_URL): paths = "\n ".join(self.candidate_paths_for_url(url)) from django.contrib.staticfiles.finders import get_finders + finders = get_finders() app_dirs = [] for finder in finders: for storage in finder.storages.values(): app_dirs.append(storage.location) app_dirs = "\n ".join(sorted(app_dirs)) - raise MissingFileError(f"""{url} not found. Searched these paths: + raise MissingFileError( + f"""{url} not found. Searched these paths: {paths} App dirs: - {app_dirs}""") + {app_dirs}""" + ) def candidate_paths_for_url(self, url): for root, prefix in self.directories: