From: Zygmunt Krynicki Date: Tue, 14 Jun 2011 08:52:43 +0000 (+0200) Subject: Do not use has_key X-Git-Tag: release-2.0~15 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/23e5d7444618141cdb74251ed5c36da6b3887a1a?ds=sidebyside;hp=dd9a31c60574ad22c8ff4efb7b75bcbc59e3ae08 Do not use has_key --- diff --git a/linaro_django_pagination/templatetags/pagination_tags.py b/linaro_django_pagination/templatetags/pagination_tags.py index 78d8866..05c44f3 100644 --- a/linaro_django_pagination/templatetags/pagination_tags.py +++ b/linaro_django_pagination/templatetags/pagination_tags.py @@ -127,7 +127,7 @@ class AutoPaginateNode(template.Node): self.multiple_paginations = multiple_paginations def render(self, context): - if self.multiple_paginations or context.has_key('paginator'): + if self.multiple_paginations or "paginator" in context: page_suffix = '_%s' % self.queryset_var else: page_suffix = ''