else:
raise TemplateSyntaxError(
"Invalid syntax. Proper usage of this tag is: "
"{% paginate [using \"TEMPLATE\"] %}")
else:
raise TemplateSyntaxError(
"Invalid syntax. Proper usage of this tag is: "
"{% paginate [using \"TEMPLATE\"] %}")
- return PaginateNode(template, window, margin)
+ return PaginateNode(template, window, margin, ignored_vars)
-def paginate(context, window=DEFAULT_WINDOW, margin=DEFAULT_MARGIN):
+def paginate(context, window=DEFAULT_WINDOW, margin=DEFAULT_MARGIN, ignored_vars=None):
"""
Renders the ``pagination/pagination.html`` template, resulting in a
Digg-like display of the available pages, given the current page. If there
"""
Renders the ``pagination/pagination.html`` template, resulting in a
Digg-like display of the available pages, given the current page. If there
page_suffix = context.get('page_suffix', '')
page_range = list(paginator.page_range)
# Calculate the record range in the current page for display.
page_suffix = context.get('page_suffix', '')
page_range = list(paginator.page_range)
# Calculate the record range in the current page for display.
if 'page%s' % page_suffix in getvars:
del getvars['page%s' % page_suffix]
if len(getvars.keys()) > 0:
if 'page%s' % page_suffix in getvars:
del getvars['page%s' % page_suffix]
if len(getvars.keys()) > 0: