--- django/contrib/staticfiles/finders.py	2011-03-04 19:10:31.000000000 -0600
+++ django/contrib/staticfiles/finders.py	2011-03-04 19:10:15.000000000 -0600
@@ -95,13 +95,13 @@
         if os.path.exists(path):
             return path
 
-    def list(self, ignore_patterns):
+    def list(self, ignore_patterns, include_patterns):
         """
         List all files in all locations.
         """
         for prefix, root in self.locations:
             storage = self.storages[root]
-            for path in utils.get_files(storage, ignore_patterns):
+            for path in utils.get_files(storage, ignore_patterns, include_patterns):
                 yield path, storage
 
 
@@ -127,13 +127,13 @@
                     self.apps.append(app)
         super(AppDirectoriesFinder, self).__init__(*args, **kwargs)
 
-    def list(self, ignore_patterns):
+    def list(self, ignore_patterns, include_patterns):
         """
         List all files in all app storages.
         """
         for storage in self.storages.itervalues():
             if storage.exists(''): # check if storage location exists
-                for path in utils.get_files(storage, ignore_patterns):
+                for path in utils.get_files(storage, ignore_patterns, include_patterns):
                     yield path, storage
 
     def find(self, path, all=False):
@@ -202,11 +202,11 @@
                 return match
         return []
 
-    def list(self, ignore_patterns):
+    def list(self, ignore_patterns, include_patterns):
         """
         List all files of the storage.
         """
-        for path in utils.get_files(self.storage, ignore_patterns):
+        for path in utils.get_files(self.storage, ignore_patterns, include_patterns):
             yield path, self.storage
 
 class DefaultStorageFinder(BaseStorageFinder):
--- django/contrib/staticfiles/utils.py	2011-02-01 08:57:10.000000000 -0600
+++ django/contrib/staticfiles/utils.py	2011-03-04 19:09:22.000000000 -0600
@@ -3,34 +3,44 @@
 from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured
 
-def is_ignored(path, ignore_patterns=[]):
+def matches(path, patterns=[]):
     """
-    Return True or False depending on whether the ``path`` should be
-    ignored (if it matches any pattern in ``ignore_patterns``).
+    Return True or False depending on whether the ``path`` matches any pattern
+    in ``patterns``.
     """
-    for pattern in ignore_patterns:
+    for pattern in patterns:
         if fnmatch.fnmatchcase(path, pattern):
             return True
     return False
 
-def get_files(storage, ignore_patterns=[], location=''):
+def is_ignored(path, ignore_patterns=[]):
+    return matches(path, ignore_patterns)
+
+def is_included(path, include_patterns=[]):
+    if not include_patterns:
+        return True
+    return matches(path, include_patterns)
+
+def get_files(storage, ignore_patterns=[], include_patterns=[], location=''):
     """
     Recursively walk the storage directories yielding the paths
     of all files that should be copied.
     """
     directories, files = storage.listdir(location)
     for fn in files:
+        if location:
+            fn = os.path.normpath(os.path.join(location, fn))
         if is_ignored(fn, ignore_patterns):
             continue
-        if location:
-            fn = os.path.join(location, fn)
+        if not is_included(fn, include_patterns):
+            continue
         yield fn
     for dir in directories:
+        if location:
+            dir = os.path.normpath(os.path.join(location, dir))
         if is_ignored(dir, ignore_patterns):
             continue
-        if location:
-            dir = os.path.join(location, dir)
-        for fn in get_files(storage, ignore_patterns, dir):
+        for fn in get_files(storage, ignore_patterns, include_patterns, dir):
             yield fn
 
 def check_settings():
--- django/contrib/staticfiles/collectstatic.py	2011-03-04 19:12:45.000000000 -0600
+++ django/contrib/staticfiles/collectstatic.py	2011-03-04 19:13:00.000000000 -0600
@@ -77,7 +77,7 @@
                 raise CommandError("Collecting static files cancelled.")
 
         for finder in finders.get_finders():
-            for path, storage in finder.list(ignore_patterns):
+            for path, storage in finder.list(ignore_patterns, []):
                 # Prefix the relative path if the source storage contains it
                 if getattr(storage, 'prefix', None):
                     prefixed_path = os.path.join(storage.prefix, path)
