+ for type, extensions in self.extensions.items():
+ if not extension in extensions:
+ continue
+ filesystem_storage = FileSystemStorage(location=path)
+ filesystem_storage.prefix = type
+ yield file, filesystem_storage
+
+# DEPRECATED # for (path, dirs, files) in os.walk(settings.THIRDPARTY_DIR):
+# DEPRECATED # component_path = path[len(settings.THIRDPARTY_DIR)+1:]
+# DEPRECATED # component_name = splitpath(component_path)[0]
+# DEPRECATED # print "PATH", path, " -- COMPONENT", component_name
+# DEPRECATED # if not os.path.islink(os.path.join(path, component_name)):
+# DEPRECATED # print "IGNORED", component_name
+# DEPRECATED # continue
+# DEPRECATED # print "COMPONENT ADDED: ", component_name
+# DEPRECATED # print "=="
+# DEPRECATED #
+# DEPRECATED #
+# DEPRECATED # for file in files:
+# DEPRECATED # name, extension = os.path.splitext(file)
+# DEPRECATED #
+# DEPRECATED # for type, extensions in self.extensions.items():
+# DEPRECATED # if not extension in extensions:
+# DEPRECATED # continue
+# DEPRECATED # filesystem_storage = FileSystemStorage(location=path)
+# DEPRECATED # filesystem_storage.prefix = type
+# DEPRECATED # yield file, filesystem_storage