X-Git-Url: https://git.mdrn.pl/django-pagination.git/blobdiff_plain/4e7903dbfc111113131fe2e93dee06bed00b1b48..c32098c13826bb1b6f3781bfae7080d3fe9e03ff:/fnp_django_pagination/templatetags/pagination_tags.py diff --git a/fnp_django_pagination/templatetags/pagination_tags.py b/fnp_django_pagination/templatetags/pagination_tags.py index 7f38da5..3802a47 100644 --- a/fnp_django_pagination/templatetags/pagination_tags.py +++ b/fnp_django_pagination/templatetags/pagination_tags.py @@ -43,9 +43,14 @@ from django.template import ( ) try: - 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 +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.loader import select_template from django.utils.text import unescape_string_literal