From: Jan Szejko Date: Wed, 29 Mar 2017 13:18:05 +0000 (+0200) Subject: fix for django 1.10 (context_instance) X-Git-Tag: 2.2.1 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/eab655c031d674680a5fa569f420615b14822458?ds=sidebyside;hp=abf535d21fd19b257e5d6fecfd60e470cc12de7f fix for django 1.10 (context_instance) --- 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):