Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e11af09a42
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (23 sloc) 0.55 kb

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 }}
Something went wrong with that request. Please try again.