diff --git a/spurl/templatetags/spurl.py b/spurl/templatetags/spurl.py index c21e4e3..028ca75 100644 --- a/spurl/templatetags/spurl.py +++ b/spurl/templatetags/spurl.py @@ -195,8 +195,12 @@ def compile_string(self, template_string, origin): that takes into account the tags and filter of the parser that rendered the parent template""" if settings.TEMPLATE_DEBUG: - from django.template.debug import DebugLexer, DebugParser - lexer_class, parser_class = DebugLexer, DebugParser + if django.VERSION <(1, 9): + from django.template.debug import DebugLexer, DebugParser + lexer_class, parser_class = DebugLexer, DebugParser + else: + from django.template.base import DebugLexer + lexer_class, parser_class = DebugLexer, Parser else: lexer_class, parser_class = Lexer, Parser if django.VERSION <(1, 9):