Fix imports for django 1.8

This commit is contained in:
Christopher Grebs 2015-04-22 16:01:47 +02:00
parent 4bba2ac839
commit eefada10f8

View File

@ -1,5 +1,10 @@
# -*- coding: utf-8 -*-
from django.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
try:
from django.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
except ImportError:
# Django 1.8 moved most stuff to .base
from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
from django.utils.translation.trans_real import (
inline_re, block_re, endblock_re, plural_re, constant_re)
from django.utils.encoding import smart_text