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=--cc Do not use has_key --- 23e5d7444618141cdb74251ed5c36da6b3887a1a 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 = ''