Normalize settings.COMPRESS_ROOT in setting mangling instead in CSS default filter.
This commit is contained in:
@@ -12,7 +12,7 @@ URL_PATTERN = re.compile(r'url\(([^\)]+)\)')
|
||||
|
||||
class CssAbsoluteFilter(FilterBase):
|
||||
def input(self, filename=None, basename=None, **kwargs):
|
||||
self.root = os.path.normcase(os.path.abspath(settings.COMPRESS_ROOT))
|
||||
self.root = settings.COMPRESS_ROOT
|
||||
if filename is not None:
|
||||
filename = os.path.normcase(os.path.abspath(filename))
|
||||
if (not (filename and filename.startswith(self.root)) and
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from django import VERSION as DJANGO_VERSION
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
@@ -66,7 +67,7 @@ class CompressorSettings(AppSettings):
|
||||
if not value:
|
||||
raise ImproperlyConfigured(
|
||||
"The COMPRESS_ROOT setting must be set.")
|
||||
return value
|
||||
return os.path.normcase(os.path.abspath(value))
|
||||
|
||||
def configure_url(self, value):
|
||||
# Uses Django 1.3's STATIC_URL by default or falls back to MEDIA_URL
|
||||
|
Reference in New Issue
Block a user