We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bba2ac commit eefada1Copy full SHA for eefada1
1 file changed
django_babel/extract.py
@@ -1,5 +1,10 @@
1
# -*- coding: utf-8 -*-
2
-from django.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
+try:
3
+ from django.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
4
+except ImportError:
5
+ # Django 1.8 moved most stuff to .base
6
+ from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
7
+
8
from django.utils.translation.trans_real import (
9
inline_re, block_re, endblock_re, plural_re, constant_re)
10
from django.utils.encoding import smart_text
0 commit comments