Support Django 4.0, drop Django < 2.1, Python < 3.6.
[django-pagination.git] / fnp_django_pagination / templatetags / pagination_tags.py
index 3802a47..015e19c 100644 (file)
@@ -42,15 +42,8 @@ from django.template import (
     loader,
 )
 
-try:
-    from django.template.base import TokenType
-    TOKEN_BLOCK = TokenType.BLOCK
-except ImportError:
-    try:
-        # Django 1.8-1.11
-        from django.template.base import TOKEN_BLOCK
-    except ImportError:     # Django < 1.8
-        from django.template import TOKEN_BLOCK
+from django.template.base import TokenType
+TOKEN_BLOCK = TokenType.BLOCK
 
 from django.template.loader import select_template
 from django.utils.text import unescape_string_literal