From: Zygmunt Krynicki Date: Tue, 19 May 2015 10:24:52 +0000 (+0200) Subject: Merge pull request #27 from amrael/django18 X-Git-Tag: release-2.1~1 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/986c8f62e9caf19bd007e4e6ce167a1dde749e89?hp=2b589e1bb9345689fba122c55fa2eeb900b5bb89 Merge pull request #27 from amrael/django18 Django 1.8 Support --- diff --git a/linaro_django_pagination/templatetags/pagination_tags.py b/linaro_django_pagination/templatetags/pagination_tags.py index 45857f9..da22e95 100644 --- a/linaro_django_pagination/templatetags/pagination_tags.py +++ b/linaro_django_pagination/templatetags/pagination_tags.py @@ -37,11 +37,16 @@ from django.template import ( Context, Library, Node, - TOKEN_BLOCK, TemplateSyntaxError, Variable, loader, ) + +try: + 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