Fixed a few imports.

This commit is contained in:
Jannis Leidel
2013-05-27 11:30:09 +02:00
parent 21e1962e5a
commit a6665bb179
5 changed files with 7 additions and 28 deletions

View File

@@ -6,14 +6,13 @@ from types import MethodType
from fnmatch import fnmatch from fnmatch import fnmatch
from optparse import make_option from optparse import make_option
from django.core.management.base import NoArgsCommand, CommandError from django.core.management.base import NoArgsCommand, CommandError
from django.template import (Context, Template, from django.template import (Context, Template,
TemplateDoesNotExist, TemplateSyntaxError) TemplateDoesNotExist, TemplateSyntaxError)
from django.utils import six 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)

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):
""" """