Opened 5 years ago

Closed 5 years ago

#22731 closed Cleanup/optimization (wontfix)

page number variable update in docs for paginator

Reported by: joeyliechty@… Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords: paginator
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In this chunk of the documentation, perhaps it would be beneficial to also update the page number variable.
Something like this:

page = request.GET.get('page')
    contacts =
    except PageNotAnInteger:
        # If page is not an integer, deliver first page.
        contacts =
        page = 1
    except EmptyPage:
        # If page is out of range (e.g. 9999), deliver last page of results.
        contacts =
        page = paginator.num_pages

Change History (1)

comment:1 Changed 5 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

Please reopen if I've missed something, but I don't see the point in updating the variable when it's not used in any code that follows.

Note: See TracTickets for help on using tickets.
Back to Top