From eab655c031d674680a5fa569f420615b14822458 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Wed, 29 Mar 2017 15:18:05 +0200 Subject: [PATCH 1/1] fix for django 1.10 (context_instance) --- fnp_django_pagination/__init__.py | 2 +- fnp_django_pagination/templatetags/pagination_tags.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fnp_django_pagination/__init__.py b/fnp_django_pagination/__init__.py index f3ce53d..c9d6c73 100644 --- a/fnp_django_pagination/__init__.py +++ b/fnp_django_pagination/__init__.py @@ -34,4 +34,4 @@ tools throughout a django application. """ -__version__ = (2, 2, 0, "final", 0) +__version__ = (2, 2, 1, "final", 0) diff --git a/fnp_django_pagination/templatetags/pagination_tags.py b/fnp_django_pagination/templatetags/pagination_tags.py index 7d41052..c56f44d 100644 --- a/fnp_django_pagination/templatetags/pagination_tags.py +++ b/fnp_django_pagination/templatetags/pagination_tags.py @@ -195,9 +195,8 @@ class PaginateNode(Node): new_context = paginate(context) if self.template: template_list.insert(0, self.template) - return loader.render_to_string(template_list, new_context, - context_instance = context) - + with context.push(new_context): + return loader.render_to_string(template_list, context) def do_paginate(parser, token): -- 2.20.1