fnp
/
django-pagination.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
806c354
)
Avoid page_suffix when context['paginator'] is None
author
Jimmy Ye
<jimmyyrj@gmail.com>
Thu, 20 Jun 2013 18:40:40 +0000
(18:40 +0000)
committer
Jimmy Ye
<jimmyyrj@gmail.com>
Thu, 20 Jun 2013 18:40:40 +0000
(18:40 +0000)
linaro_django_pagination/templatetags/pagination_tags.py
patch
|
blob
|
history
diff --git
a/linaro_django_pagination/templatetags/pagination_tags.py
b/linaro_django_pagination/templatetags/pagination_tags.py
index
b447625
..
28e2897
100644
(file)
--- 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 = ''