Skip to content

Commit

Permalink
docs for the new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
honzakral committed Apr 12, 2012
1 parent 5ca2046 commit d5d4495
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ella/core/templatetags/pagination.py
Expand Up @@ -45,6 +45,9 @@ def paginator(context, adjacent_pages=2, template_name=None):
pagination context. To be used in conjunction with the ``object_list`` generic
view.
If ``TEMPLATE_NAME`` parameter is given,
``inclusion_tags/paginator_TEMPLATE_NAME.html`` will be used instead.
Adds pagination context variables for use in displaying first, adjacent pages and
last page links in addition to those created by the ``object_list`` generic
view.
Expand All @@ -53,12 +56,14 @@ def paginator(context, adjacent_pages=2, template_name=None):
Syntax::
{% paginator[ <NUMBER_OF_ADJACENT_PAGES] %}
{% paginator [NUMBER_OF_ADJACENT_PAGES] [TEMPLATE_NAME] %}
Examples::
{% paginator %}
{% paginator 5 %}
{% paginator 5 "special" %}
{% paginator template_name="special" %}
"""
tname, context = _do_paginator(context, adjacent_pages, template_name)
return render_to_string(tname, context)

0 comments on commit d5d4495

Please sign in to comment.