summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-10-21 03:16:58 +0000
committerJannis Leidel <jannis@leidel.info>2010-10-21 03:16:58 +0000
commit58af951c30670ea19bd2e7795daffd8f14383f71 (patch)
treef6636b8d6346c74e0d5b5c3c2420aa2b54268108
parent1c4868f4c15f41c7840129d0f04c87f65aa94367 (diff)
Fixing a few cosmetic bugs. Thanks for the hint, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/staticfiles/finders.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/django/contrib/staticfiles/finders.py b/django/contrib/staticfiles/finders.py
index 7f0a497174..ca0a248a39 100644
--- a/django/contrib/staticfiles/finders.py
+++ b/django/contrib/staticfiles/finders.py
@@ -42,10 +42,11 @@ class FileSystemFinder(BaseFinder):
A static files finder that uses the ``STATICFILES_DIRS`` setting
to locate files.
"""
- storages = SortedDict()
- locations = set()
-
def __init__(self, apps=None, *args, **kwargs):
+ # Maps dir paths to an appropriate storage instance
+ self.storages = SortedDict()
+ # Set of locations with static files
+ self.locations = set()
for root in settings.STATICFILES_DIRS:
if isinstance(root, (list, tuple)):
prefix, root = root
@@ -55,6 +56,7 @@ class FileSystemFinder(BaseFinder):
# Don't initialize multiple storages for the same location
for prefix, root in self.locations:
self.storages[root] = FileSystemStorage(location=root)
+
super(FileSystemFinder, self).__init__(*args, **kwargs)
def find(self, path, all=False):
@@ -99,10 +101,11 @@ class AppDirectoriesFinder(BaseFinder):
"""
A static files finder that looks in the ``media`` directory of each app.
"""
- storages = {}
storage_class = AppStaticStorage
def __init__(self, apps=None, *args, **kwargs):
+ # Maps app modules to appropriate storage instances
+ self.storages = SortedDict()
if apps is not None:
self.apps = apps
else: