Use the storage directly to get the path.
This commit is contained in:
@@ -60,10 +60,8 @@ class Compressor(object):
|
|||||||
if settings.DEBUG and self.finders:
|
if settings.DEBUG and self.finders:
|
||||||
filename = self.finders.find(basename)
|
filename = self.finders.find(basename)
|
||||||
# secondly try finding the file in the root
|
# secondly try finding the file in the root
|
||||||
else:
|
elif self.storage.exists(basename):
|
||||||
root_filename = os.path.join(settings.COMPRESS_ROOT, basename)
|
filename = self.storage.path(basename)
|
||||||
if os.path.exists(root_filename):
|
|
||||||
filename = root_filename
|
|
||||||
if filename:
|
if filename:
|
||||||
return filename
|
return filename
|
||||||
# or just raise an exception as the last resort
|
# or just raise an exception as the last resort
|
||||||
|
|||||||
Reference in New Issue
Block a user