Fixed a few imports.
This commit is contained in:
@@ -13,7 +13,6 @@ from django.utils import six
|
|||||||
from django.utils.datastructures import SortedDict
|
from django.utils.datastructures import SortedDict
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
from django.template.loader import get_template # noqa Leave this in to preload template locations
|
from django.template.loader import get_template # noqa Leave this in to preload template locations
|
||||||
from django.template.defaulttags import IfNode
|
|
||||||
from django.template.loader_tags import (ExtendsNode, BlockNode,
|
from django.template.loader_tags import (ExtendsNode, BlockNode,
|
||||||
BLOCK_CONTEXT_KEY)
|
BLOCK_CONTEXT_KEY)
|
||||||
|
|
||||||
|
@@ -1,16 +1,11 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
from django.utils import six
|
||||||
|
from django.utils.encoding import smart_text
|
||||||
|
|
||||||
from compressor.exceptions import ParserError
|
from compressor.exceptions import ParserError
|
||||||
from compressor.parser import ParserBase
|
from compressor.parser import ParserBase
|
||||||
from compressor.utils.decorators import cached_property
|
from compressor.utils.decorators import cached_property
|
||||||
from django.utils import six
|
|
||||||
|
|
||||||
try:
|
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
except ImportError:
|
|
||||||
# django < 1.4.2
|
|
||||||
from django.utils.encoding import smart_unicode as smart_text
|
|
||||||
|
|
||||||
|
|
||||||
class BeautifulSoupParser(ParserBase):
|
class BeautifulSoupParser(ParserBase):
|
||||||
|
@@ -1,14 +1,9 @@
|
|||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
from django.utils.encoding import smart_text
|
||||||
|
|
||||||
from compressor.exceptions import ParserError
|
from compressor.exceptions import ParserError
|
||||||
from compressor.parser import ParserBase
|
from compressor.parser import ParserBase
|
||||||
|
|
||||||
try:
|
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
except ImportError:
|
|
||||||
# django < 1.4.2
|
|
||||||
from django.utils.encoding import smart_unicode as smart_text
|
|
||||||
|
|
||||||
|
|
||||||
class DefaultHtmlParser(ParserBase, six.moves.html_parser.HTMLParser):
|
class DefaultHtmlParser(ParserBase, six.moves.html_parser.HTMLParser):
|
||||||
def __init__(self, content):
|
def __init__(self, content):
|
||||||
|
@@ -1,16 +1,11 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
from django.utils.encoding import smart_text
|
||||||
|
|
||||||
from compressor.exceptions import ParserError
|
from compressor.exceptions import ParserError
|
||||||
from compressor.parser import ParserBase
|
from compressor.parser import ParserBase
|
||||||
from compressor.utils.decorators import cached_property
|
from compressor.utils.decorators import cached_property
|
||||||
|
|
||||||
try:
|
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
except ImportError:
|
|
||||||
# django < 1.4.2
|
|
||||||
from django.utils.encoding import smart_unicode as smart_text
|
|
||||||
|
|
||||||
|
|
||||||
class Html5LibParser(ParserBase):
|
class Html5LibParser(ParserBase):
|
||||||
|
|
||||||
|
@@ -1,18 +1,13 @@
|
|||||||
from __future__ import absolute_import, unicode_literals
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
from django.utils import six
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
from django.utils import six
|
||||||
|
from django.utils.encoding import smart_text
|
||||||
|
|
||||||
from compressor.exceptions import ParserError
|
from compressor.exceptions import ParserError
|
||||||
from compressor.parser import ParserBase
|
from compressor.parser import ParserBase
|
||||||
from compressor.utils.decorators import cached_property
|
from compressor.utils.decorators import cached_property
|
||||||
|
|
||||||
try:
|
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
except ImportError:
|
|
||||||
# django < 1.4.2
|
|
||||||
from django.utils.encoding import smart_unicode as smart_text
|
|
||||||
|
|
||||||
|
|
||||||
class LxmlParser(ParserBase):
|
class LxmlParser(ParserBase):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user