diff --git a/compressor/cache.py b/compressor/cache.py index 264cf4c..c441522 100644 --- a/compressor/cache.py +++ b/compressor/cache.py @@ -25,8 +25,8 @@ def get_mtime_cachekey(filename): def get_offline_cachekey(source): - return get_cachekey( - "offline.%s" % get_hexdigest("".join(smart_str(s) for s in source))) + to_hexdigest = [smart_str(getattr(s, 's', s)) for s in source] + return get_cachekey("offline.%s" % get_hexdigest(to_hexdigest)) def get_templatetag_cachekey(compressor, mode, kind): diff --git a/compressor/tests/runtests.py b/compressor/tests/runtests.py old mode 100644 new mode 100755 index 9752ec6..b601217 --- a/compressor/tests/runtests.py +++ b/compressor/tests/runtests.py @@ -10,7 +10,7 @@ TEST_DIR = os.path.dirname(os.path.abspath(__file__)) if not settings.configured: settings.configure( - COMPRESS_CACHE_BACKEND = 'dummy://', + COMPRESS_CACHE_BACKEND = 'locmem://', DATABASE_ENGINE='sqlite3', INSTALLED_APPS=[ 'compressor', diff --git a/compressor/tests/templates/test_compressor_offline.html b/compressor/tests/templates/test_compressor_offline.html index eac0455..5faa8a8 100644 --- a/compressor/tests/templates/test_compressor_offline.html +++ b/compressor/tests/templates/test_compressor_offline.html @@ -1,4 +1,5 @@ {% load compress %} +{% spaceless %} {% compress css%}