Ticket #18421: 18421.diff

File 18421.diff, 557 bytes (added by Mike Lissner, 12 years ago)

Patch to fix the above issue.

  • 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::  
    8787        contact_list = Contacts.objects.all()
    8888        paginator = Paginator(contact_list, 25) # Show 25 contacts per page
    8989
    90         page = request.GET.get('page')
     90        page = request.GET.get('page', 1)  # show page one if none requested
    9191        try:
    9292            contacts = paginator.page(page)
    9393        except PageNotAnInteger:
Back to Top