fix for django 1.10 (context_instance) 2.2.1
authorJan Szejko <janek37@gmail.com>
Wed, 29 Mar 2017 13:18:05 +0000 (15:18 +0200)
committerJan Szejko <janek37@gmail.com>
Wed, 29 Mar 2017 13:18:05 +0000 (15:18 +0200)
fnp_django_pagination/__init__.py
fnp_django_pagination/templatetags/pagination_tags.py

index f3ce53d..c9d6c73 100644 (file)
@@ -34,4 +34,4 @@ tools throughout a django application.
 """
 
 
-__version__ = (2, 2, 0, "final", 0)
+__version__ = (2, 2, 1, "final", 0)
index 7d41052..c56f44d 100644 (file)
@@ -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):