Merge remote-tracking branch 'jezdez/develop' into py3_new

Conflicts:
	compressor/filters/base.py
This commit is contained in:
Kudlaty
2013-04-16 13:41:00 +02:00
3 changed files with 9 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import subprocess
from django.core.exceptions import ImproperlyConfigured
from django.core.files.temp import NamedTemporaryFile
from django.utils.importlib import import_module
from django.utils.encoding import smart_unicode
from django.utils import six
from compressor.conf import settings
@@ -183,4 +184,5 @@ class CompilerFilter(FilterBase):
self.infile.close()
if self.outfile is not None:
self.outfile.close()
return filtered
return smart_unicode(filtered)

View File

@@ -79,6 +79,11 @@ class PrecompilerTestCase(TestCase):
charset=settings.FILE_CHARSET, command=command)
self.assertEqual("body { color:#990; }%s" % os.linesep, compiler.input())
def test_precompiler_output_unicode(self):
command = '%s %s' % (sys.executable, self.test_precompiler)
compiler = CompilerFilter(content=self.content, filename=self.filename, command=command)
self.assertEqual(type(compiler.input()), unicode)
class CssMinTestCase(TestCase):
def test_cssmin_filter(self):

View File

@@ -334,7 +334,7 @@ Caching settings
.. attribute:: COMPRESS_CACHE_BACKEND
:Default: ``"default"`` or ``CACHE_BACKEND``
:Default: ``CACHES["default"]`` or ``CACHE_BACKEND``
The backend to use for caching, in case you want to use a different cache
backend for Django Compressor.