Commits

Alan Justino committed c6a0096

Transparently mimics master_storage, (e.g. for S3BotoStorage.entries)

  • Participants
  • Parent commits c0c848b
  • Branches filecache_storage_proposal

Comments (0)

Files changed (1)

File storages/backends/filecache.py

         return self._get_storage(name) is self.master_storage
 
     ### Optimizations
+
+    """Transparently mimics master_storage, (e.g. for S3BotoStorage.entries)"""
+    def __getattr__(self, name):
+        return getattr(self.master_storage, name)
+
+    def __setattr__(self, name, value):
+        setattr(self.master_storage, name, value)
+
     """
     Comes from http://www.djangosnippets.org/snippets/976/
     (even if it already exists in S3Storage for ages)