Allow default CSS filters to be modified; fix issue 9.

This commit is contained in:
Carl Meyer
2010-01-08 13:24:33 -05:00
committed by Jannis Leidel
parent 1811c8f854
commit 3be00046d4
3 changed files with 3 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ be written to.
``COMPRESS_CSS_FILTERS``
------------------------
:Default: ``[]``
:Default: ``['compressor.filters.css_default.CssAbsoluteFilter]``
A list of filters that will be applied to CSS.

View File

@@ -8,7 +8,7 @@ OUTPUT_DIR = getattr(settings, 'COMPRESS_OUTPUT_DIR', 'CACHE')
STORAGE = getattr(settings, 'COMPRESS_STORAGE', 'compressor.storage.CompressorFileStorage')
COMPRESS = getattr(settings, 'COMPRESS', not settings.DEBUG)
COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', [])
COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', ['compressor.filters.css_default.CssAbsoluteFilter'])
COMPRESS_JS_FILTERS = getattr(settings, 'COMPRESS_JS_FILTERS', ['compressor.filters.jsmin.JSMinFilter'])
COMPRESS_LESSC_BINARY = getattr(settings, 'COMPRESS_LESSC_BINARY', 'lessc')

View File

@@ -9,8 +9,7 @@ class CssCompressor(Compressor):
self.extension = ".css"
self.template_name = "compressor/css.html"
self.template_name_inline = "compressor/css_inline.html"
self.filters = ['compressor.filters.css_default.CssAbsoluteFilter']
self.filters.extend(settings.COMPRESS_CSS_FILTERS)
self.filters = list(settings.COMPRESS_CSS_FILTERS)
self.type = 'css'
super(CssCompressor, self).__init__(content, output_prefix)