Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pipeline/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -29,15 +29,15 @@ 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
"""
matches = []
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
Expand All @@ -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
"""
Expand All @@ -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 []
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down