Fixed passing Storage instance
This commit is contained in:
parent
432118ac58
commit
227ce5fccb
@ -19,7 +19,10 @@ class CachedStorage(Storage):
|
|||||||
if not cachedir:
|
if not cachedir:
|
||||||
cachedir = getattr(settings, 'CACHED_STORAGE_DIR', 'cache')
|
cachedir = getattr(settings, 'CACHED_STORAGE_DIR', 'cache')
|
||||||
|
|
||||||
self.remote = get_storage_class(remote)()
|
if isinstance(remote, Storage):
|
||||||
|
self.remote = remote
|
||||||
|
else:
|
||||||
|
self.remote = get_storage_class(remote)()
|
||||||
self.cachedir = cachedir
|
self.cachedir = cachedir
|
||||||
self.expires = expires
|
self.expires = expires
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user