Commit 7eacc447 by Timothée Peignier

use COMPRESS_* everywhere

parent fa470e9c
...@@ -97,13 +97,13 @@ def concat(filenames, separator=''): ...@@ -97,13 +97,13 @@ def concat(filenames, separator=''):
contents = fd.read() contents = fd.read()
fd.close() fd.close()
if filename.lower().endswith('.css') and \ if filename.lower().endswith('.css') and \
django_settings.MEDIA_ROOT == settings.COMPRESS_SOURCE: django_settings.COMPRESS_ROOT == settings.COMPRESS_SOURCE:
if django_settings.MEDIA_URL.endswith('/'): if django_settings.COMPRESS_URL.endswith('/'):
abspath = os.path.normpath(os.path.dirname(filename)) abspath = os.path.normpath(os.path.dirname(filename))
else: else:
abspath = os.path.normpath(os.path.join('/', abspath = os.path.normpath(os.path.join('/',
os.path.dirname(filename))) os.path.dirname(filename)))
abspath = django_settings.MEDIA_URL + abspath + '/' abspath = django_settings.COMPRESS_URL + abspath + '/'
fixed = rel_exp.sub('\\1' + abspath + '\\2\\3', contents) fixed = rel_exp.sub('\\1' + abspath + '\\2\\3', contents)
r += fixed r += fixed
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment