Ticket #18421: 18421.diff
File 18421.diff, 557 bytes (added by , 12 years ago) |
---|
-
docs/topics/pagination.txt
diff --git a/docs/topics/pagination.txt b/docs/topics/pagination.txt index 566319f..558fdf3 100644
a b The view function looks like this:: 87 87 contact_list = Contacts.objects.all() 88 88 paginator = Paginator(contact_list, 25) # Show 25 contacts per page 89 89 90 page = request.GET.get('page' )90 page = request.GET.get('page', 1) # show page one if none requested 91 91 try: 92 92 contacts = paginator.page(page) 93 93 except PageNotAnInteger: