Merge branch 'develop' of github.com:django-compressor/django-compressor into develop
This commit is contained in:
@@ -5,6 +5,9 @@ import codecs
|
||||
from django.core.files.base import ContentFile
|
||||
from django.template import Context
|
||||
from django.template.loader import render_to_string
|
||||
try:
|
||||
from importlib import import_module
|
||||
except:
|
||||
from django.utils.importlib import import_module
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
|
||||
@@ -4,10 +4,20 @@ import os
|
||||
import socket
|
||||
import time
|
||||
|
||||
try:
|
||||
from django.core.cache import caches
|
||||
def get_cache(name):
|
||||
return caches[name]
|
||||
except ImportError:
|
||||
from django.core.cache import get_cache
|
||||
|
||||
from django.core.files.base import ContentFile
|
||||
from django.utils.encoding import force_text, smart_bytes
|
||||
from django.utils.functional import SimpleLazyObject
|
||||
|
||||
try:
|
||||
from importlib import import_module
|
||||
except:
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
from compressor.conf import settings
|
||||
|
||||
@@ -3,14 +3,27 @@ import io
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from platform import system
|
||||
|
||||
if system() != "Windows":
|
||||
try:
|
||||
from shlex import quote as shell_quote # Python 3
|
||||
except ImportError:
|
||||
from pipes import quote as shell_quote # Python 2
|
||||
else:
|
||||
from subprocess import list2cmdline
|
||||
def shell_quote(s):
|
||||
# shlex.quote/pipes.quote is not compatible with Windows
|
||||
return list2cmdline([s])
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.files.temp import NamedTemporaryFile
|
||||
|
||||
try:
|
||||
from importlib import import_module
|
||||
except ImportError:
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
from django.utils.encoding import smart_text
|
||||
from django.utils import six
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from django.utils import six
|
||||
from django.utils.functional import LazyObject
|
||||
try:
|
||||
from importlib import import_module
|
||||
except ImportError:
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
# support legacy parser module usage
|
||||
|
||||
@@ -321,7 +321,7 @@ Backend settings
|
||||
<link rel="stylesheet" href="/static/CACHE/css/8ccf8d877f18.css" type="text/css" charset="utf-8">
|
||||
|
||||
.. _less: http://lesscss.org/
|
||||
.. _CoffeeScript: http://jashkenas.github.com/coffee-script/
|
||||
.. _CoffeeScript: http://coffeescript.org/
|
||||
|
||||
.. attribute:: COMPRESS_STORAGE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user