~netlandish/django-pagination

71c0dda0df1dc5e814b2ceb7b47c7da464a1cc99 — Gustavo Andres Morero 5 years ago a484654
update for Django 2.1 support.
1 files changed, 2 insertions(+), 2 deletions(-)

M pagination/templatetags/pagination_tags.py
M pagination/templatetags/pagination_tags.py => pagination/templatetags/pagination_tags.py +2 -2
@@ 4,7 4,7 @@ except NameError:
    from sets import Set as set

from django import template
from django.template.base import TOKEN_BLOCK
from django.template.base import TokenType
from django.http import Http404
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings


@@ 23,7 23,7 @@ def do_autopaginate(parser, token):
    """
    
    # Check whether there are any other autopaginations are later in this template
    expr = lambda obj: (obj.token_type == TOKEN_BLOCK and \
    expr = lambda obj: (obj.token_type == TokenType.BLOCK.value and \
        len(obj.split_contents()) > 0 and obj.split_contents()[0] == "autopaginate")
    multiple_paginations = len(list(filter(expr, parser.tokens))) > 0