Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginator constructor #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ view file: **views.py**
from django.shortcuts import render_to_response

from pure_pagination import Paginator, EmptyPage, PageNotAnInteger

from ${YOUR_APP}.settings import PAGINATION_SETTINGS

def index(request):

Expand All @@ -120,8 +120,8 @@ view file: **views.py**
objects = ['john', 'edward', 'josh', 'frank']

# Provide Paginator with the request object for complete querystring generation

p = Paginator(objects, request=request)
# 2nd Param is required here
p = Paginator(objects, PAGINATION_SETTINGS['PAGE_RANGE_DISPLAYED'], request=request)

people = p.page(page)

Expand Down