Commit 78daeb80 by andreas.pelme

Fixes for Djangos signal refactor. Thanks Alexander Pugachev

git-svn-id: https://django-compress.googlecode.com/svn/trunk@75 98d35234-f74b-0410-9e22-51d878bdf110
parent a435ca77
css_filtered = object()
js_filtered = object()
\ No newline at end of file
from django.dispatch import Signal
css_filtered = Signal()
js_filtered = Signal()
......@@ -121,10 +121,10 @@ def filter_common(obj, verbosity, filters, attr, separator, signal):
output = getattr(get_filter(f)(verbose=(verbosity >= 2)), attr)(output)
save_file(filename, output)
dispatcher.send(signal=signal)
signal.send(None)
def filter_css(css, verbosity=0):
return filter_common(css, verbosity, filters=settings.COMPRESS_CSS_FILTERS, attr='filter_css', separator='', signal=css_filtered)
def filter_js(js, verbosity=0):
return filter_common(js, verbosity, filters=settings.COMPRESS_JS_FILTERS, attr='filter_js', separator=';', signal=js_filtered)
\ No newline at end of file
return filter_common(js, verbosity, filters=settings.COMPRESS_JS_FILTERS, attr='filter_js', separator=';', signal=js_filtered)
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