This commit is contained in:
parent
b38c656681
commit
2db1f3bba7
|
@ -67,7 +67,7 @@ class XStaticFinder(BaseFinder):
|
|||
if path.startswith(self.storage_class.prefix + '/'):
|
||||
path = path[len(self.storage_class.prefix) + 1 :]
|
||||
matches = []
|
||||
for app, storage in self.storages.items():
|
||||
for storage in self.storages.values():
|
||||
if storage.exists(path):
|
||||
matched_path = storage.path(path)
|
||||
if matched_path:
|
||||
|
@ -76,8 +76,8 @@ class XStaticFinder(BaseFinder):
|
|||
matches.append(matched_path)
|
||||
return matches
|
||||
|
||||
def list(self, ignore_patterns=[]):
|
||||
def list(self, ignore_patterns=None):
|
||||
"""List all files in registered xstatic.* packages"""
|
||||
for app, storage in self.storages.items():
|
||||
for path in utils.get_files(storage, ignore_patterns):
|
||||
for storage in self.storages.values():
|
||||
for path in utils.get_files(storage, ignore_patterns or []):
|
||||
yield path, storage
|
||||
|
|
|
@ -6,9 +6,9 @@ from django import template
|
|||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.forms import BoundField
|
||||
from django.template import TemplateSyntaxError
|
||||
from django.utils.html import escape
|
||||
from django.utils.http import urlencode
|
||||
from xstatic.main import XStatic
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
|
Loading…
Reference in New Issue