From: Zygmunt Krynicki Date: Fri, 21 Jun 2013 12:25:27 +0000 (-0700) Subject: Merge pull request #13 from jimmyye/master X-Git-Tag: release-2.1~10 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/0550c50734ac764565ca9a7b95f4cd5a81534283?hp=806c354e33169adb67ca2f5aaad052e9144ab0d5 Merge pull request #13 from jimmyye/master Avoid page_suffix when context['paginator'] is None --- 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 = ''