Sexy pagination in Django
Python
Pull request Compare This branch is 25 commits ahead, 9 commits behind dcramer:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
debian
paging
.gitignore
LICENSE
MANIFEST.in
README.rst
setup.py

README.rst

About

A simple and efficient paginator.

Jinja2

Jinja2 is supported via Coffin:

{% with paginate(request, my_queryset) as results %}
  {{ results.paging }}
  {% for result in results.objects %}
    {{ result }}
  {% endfor %}
  {{ results.paging }}
{% endwith %}

Django

Django templatetags require django-templatetag-sugar:

{% load paging_extras %}

{% paginate my_queryset from request as results %}
{{ results.paging }}
{% for result in results.objects %}
  {{ result }}
{% endfor %}
{{ results.paging }}