Commit cbeb85ea by Timothée Peignier

move FilterBase in filters module

parent 9e2db91b
class FilterBase:
def __init__(self, verbose):
self.verbose = verbose
def filter_css(self, css):
raise NotImplementedError
def filter_js(self, js):
raise NotImplementedError
class FilterError(Exception):
"""This exception is raised when a filter fails"""
pass
class FilterBase:
def __init__(self, verbose):
self.verbose = verbose
def filter_css(self, css):
raise NotImplementedError
def filter_js(self, js):
raise NotImplementedError
class FilterError(Exception):
"""This exception is raised when a filter fails"""
pass
import subprocess
from compress.conf import settings
from compress.filter_base import FilterBase, FilterError
from compress.filters import FilterBase, FilterError
class ClosureCompressorFilter(FilterBase):
......
......@@ -4,7 +4,7 @@ import tempfile
from django.conf import settings
from compress.filter_base import FilterBase
from compress.filters import FilterBase
BINARY = getattr(settings, 'CSSTIDY_BINARY', 'csstidy')
ARGUMENTS = getattr(settings, 'CSSTIDY_ARGUMENTS', '--template=highest')
......
from compress.filters.jsmin.jsmin import jsmin
from compress.filter_base import FilterBase
from compress.filters import FilterBase
class JSMinFilter(FilterBase):
......
import subprocess
from compress.conf import settings
from compress.filter_base import FilterBase, FilterError
from compress.filters import FilterBase, FilterError
class UglifyJSCompressorFilter(FilterBase):
......
import subprocess
from compress.conf import settings
from compress.filter_base import FilterBase, FilterError
from compress.filters import FilterBase, FilterError
class YUICompressorFilter(FilterBase):
......
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