django-pager 0.1.7

Django Pagination
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, 21:36 GMT
price:
FREE!
homepage:
github.com
license type:
MIT/X Consortium License 
developed by:
Ilya Shalyapin
category:
ROOT \ Internet \ HTTP (WWW)
django-pager
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT