django-pager 0.1.7

Django Pagination

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Ilya Shalyapin
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
django-pager is a Django app for that provides pagination support.

Installation

    pip install django-pager

Configuration

settings.py

    INSTALLED_APPS = (
        ...
        'django_pager',
    )


Usage

views.py

    from django_pager import paginate

    def listing(request):
        qs = Contact.objects.all()
        page = request.GET.get('page', 1)
        contacts = paginate(qs, page, 10)
        # You can also get page numbers reversed
        # contacts = paginate(qs, page, 10, reverse=True)
        return render_to_response('list.html', {"contacts": contacts})


list.html

    {% include 'django_pager/pager.html' with objects=contacts %}

Last updated on September 20th, 2012

requirements

#Django pagination #Django pager #Django app #Django #pager #pagination #article

Add your review!

SUBMIT