Merge remote-tracking branch 'jezdez/develop' into py3_new
Conflicts: compressor/filters/base.py
This commit is contained in:
@@ -6,6 +6,7 @@ import subprocess
|
|||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from django.core.files.temp import NamedTemporaryFile
|
from django.core.files.temp import NamedTemporaryFile
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
|
from django.utils.encoding import smart_unicode
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
||||||
from compressor.conf import settings
|
from compressor.conf import settings
|
||||||
@@ -183,4 +184,5 @@ class CompilerFilter(FilterBase):
|
|||||||
self.infile.close()
|
self.infile.close()
|
||||||
if self.outfile is not None:
|
if self.outfile is not None:
|
||||||
self.outfile.close()
|
self.outfile.close()
|
||||||
return filtered
|
|
||||||
|
return smart_unicode(filtered)
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ class PrecompilerTestCase(TestCase):
|
|||||||
charset=settings.FILE_CHARSET, command=command)
|
charset=settings.FILE_CHARSET, command=command)
|
||||||
self.assertEqual("body { color:#990; }%s" % os.linesep, compiler.input())
|
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):
|
class CssMinTestCase(TestCase):
|
||||||
def test_cssmin_filter(self):
|
def test_cssmin_filter(self):
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ Caching settings
|
|||||||
|
|
||||||
.. attribute:: COMPRESS_CACHE_BACKEND
|
.. 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
|
The backend to use for caching, in case you want to use a different cache
|
||||||
backend for Django Compressor.
|
backend for Django Compressor.
|
||||||
|
|||||||
Reference in New Issue
Block a user