From 8c81e1376def65ad52c18deb663fce59a33aeed6 Mon Sep 17 00:00:00 2001 From: Jimmy Ye Date: Thu, 20 Jun 2013 18:40:40 +0000 Subject: [PATCH 1/1] Avoid page_suffix when context['paginator'] is None --- linaro_django_pagination/templatetags/pagination_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linaro_django_pagination/templatetags/pagination_tags.py b/linaro_django_pagination/templatetags/pagination_tags.py index b447625..28e2897 100644 --- a/linaro_django_pagination/templatetags/pagination_tags.py +++ b/linaro_django_pagination/templatetags/pagination_tags.py @@ -135,7 +135,7 @@ class AutoPaginateNode(Node): self.multiple_paginations = multiple_paginations def render(self, context): - if self.multiple_paginations or "paginator" in context: + if self.multiple_paginations or getattr(context, "paginator", None): page_suffix = '_%s' % self.queryset_var else: page_suffix = '' -- 2.20.1