Do not use has_key
authorZygmunt Krynicki <zygmunt.krynicki@linaro.org>
Tue, 14 Jun 2011 08:52:43 +0000 (10:52 +0200)
committerZygmunt Bazyli Krynicki <Zygmunt Krynicki zygmunt.krynicki@linaro.org>
Tue, 14 Jun 2011 08:52:43 +0000 (10:52 +0200)
linaro_django_pagination/templatetags/pagination_tags.py

index 78d8866..05c44f3 100644 (file)
@@ -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 = ''