diff --git a/pipeline/finders.py b/pipeline/finders.py index b0ce890e..05a12912 100644 --- a/pipeline/finders.py +++ b/pipeline/finders.py @@ -18,7 +18,7 @@ class PipelineFinder(BaseStorageFinder): storage = staticfiles_storage - def find(self, path, all=False): + def find(self, path, all=False, find_all=False): if not settings.PIPELINE_ENABLED: return super().find(path, all) else: @@ -29,7 +29,7 @@ def list(self, ignore_patterns): class ManifestFinder(BaseFinder): - def find(self, path, all=False): + def find(self, path, all=False, find_all=False): """ Looks for files in PIPELINE.STYLESHEETS and PIPELINE.JAVASCRIPT """ @@ -37,7 +37,7 @@ def find(self, path, all=False): for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()): if normpath(elem["output_filename"]) == normpath(path): match = safe_join(settings.PIPELINE_ROOT, path) - if not all: + if not (all or find_all): return match matches.append(match) return matches @@ -47,7 +47,7 @@ def list(self, *args): class CachedFileFinder(BaseFinder): - def find(self, path, all=False): + def find(self, path, all=False, find_all=False): """ Work out the uncached name of the file and look that up instead """ @@ -56,7 +56,7 @@ def find(self, path, all=False): except ValueError: return [] path = ".".join((start, extn)) - return find(path, all=all) or [] + return find(path, all=(all or find_all)) or [] def list(self, *args): return [] diff --git a/pyproject.toml b/pyproject.toml index 369a34e4..271ddccd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", "Framework :: Django :: 5.1", + "Framework :: Django :: 5.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent",