Skip to content

Commit dbc1137

Browse files
committed
Small cleanup based on python-babel#45
1 parent c60a307 commit dbc1137

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

django_babel/extract.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
2+
from django.template.base import Lexer
23
try:
3-
from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
4-
except ImportError:
5-
# Django 2.1+
6-
from django.template.base import Lexer, TokenType
7-
4+
from django.template.base import TokenType
5+
except ImportError: # django < 2.1
6+
from django.template.base import TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
7+
else:
88
TOKEN_TEXT = TokenType.TEXT
99
TOKEN_VAR = TokenType.VAR
1010
TOKEN_BLOCK = TokenType.BLOCK

0 commit comments

Comments
 (0)