Guessing like a pro..
This commit is contained in:
@@ -7,7 +7,6 @@ from django.template import Context
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.importlib import import_module
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.encoding import force_bytes
|
||||
|
||||
try:
|
||||
from urllib.request import url2pathname
|
||||
@@ -310,7 +309,7 @@ class Compressor(object):
|
||||
"""
|
||||
new_filepath = self.get_filepath(content, basename=basename)
|
||||
if not self.storage.exists(new_filepath) or forced:
|
||||
self.storage.save(new_filepath, ContentFile(force_bytes(content)))
|
||||
self.storage.save(new_filepath, ContentFile(content.encode(self.charset)))
|
||||
url = mark_safe(self.storage.url(new_filepath))
|
||||
return self.render_output(mode, {"url": url})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user