fnp
/
django-pagination.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
47e7ec8
)
add request back from context and fix error handling
author
Justin Quick
<justquick@gmail.com>
Tue, 20 Jul 2010 18:57:11 +0000
(14:57 -0400)
committer
Justin Quick
<justquick@gmail.com>
Tue, 20 Jul 2010 18:57:11 +0000
(14:57 -0400)
pagination/templatetags/pagination_tags.py
patch
|
blob
|
history
diff --git
a/pagination/templatetags/pagination_tags.py
b/pagination/templatetags/pagination_tags.py
index
ae843b1
..
dd338a2
100644
(file)
--- a/
pagination/templatetags/pagination_tags.py
+++ b/
pagination/templatetags/pagination_tags.py
@@
-214,6
+214,7
@@
def paginate(context, window=DEFAULT_WINDOW, hashtag=''):
'is_paginated': paginator.count > paginator.per_page,
}
if 'request' in context:
'is_paginated': paginator.count > paginator.per_page,
}
if 'request' in context:
+ to_return['request'] = context['request']
getvars = context['request'].GET.copy()
if 'page' in getvars:
del getvars['page']
getvars = context['request'].GET.copy()
if 'page' in getvars:
del getvars['page']
@@
-222,7
+223,7
@@
def paginate(context, window=DEFAULT_WINDOW, hashtag=''):
else:
to_return['getvars'] = ''
return to_return
else:
to_return['getvars'] = ''
return to_return
- except
KeyError, AttributeError
:
+ except
(KeyError, AttributeError)
:
return {}
register.inclusion_tag('pagination/pagination.html', takes_context=True)(
return {}
register.inclusion_tag('pagination/pagination.html', takes_context=True)(