context['page_obj'] = page_obj
return u''
-def paginate(context, window=DEFAULT_WINDOW, hashtag=None):
+
+def paginate(context, window=DEFAULT_WINDOW, hashtag=''):
"""
Renders the ``pagination/pagination.html`` template, resulting in a
Digg-like display of the available pages, given the current page. If there
'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']
else:
to_return['getvars'] = ''
return to_return
- except KeyError, AttributeError:
+ except (KeyError, AttributeError):
return {}
register.inclusion_tag('pagination/pagination.html', takes_context=True)(