From 85fccdadc5fcde0071721942395bd515ea9eed03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Markus=20T=C3=B6rnqvist?= Date: Wed, 26 Jun 2013 16:02:56 +0300 Subject: [PATCH] Skip updating empty dict over context --- linaro_django_pagination/templatetags/pagination_tags.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linaro_django_pagination/templatetags/pagination_tags.py b/linaro_django_pagination/templatetags/pagination_tags.py index be22347..affdc16 100644 --- a/linaro_django_pagination/templatetags/pagination_tags.py +++ b/linaro_django_pagination/templatetags/pagination_tags.py @@ -186,7 +186,7 @@ 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, + return loader.render_to_string(template_list, new_context, context_instance = context) @@ -328,9 +328,7 @@ def paginate(context, window=DEFAULT_WINDOW, margin=DEFAULT_MARGIN): new_context['getvars'] = '' return new_context except (KeyError, AttributeError): - new_context = {} - - context.update(new_context) + pass return context -- 2.20.1