Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#523 closed defect (invalid)

object_list sets current page number incorrectly

Reported by: marcink Owned by: Jacob
Component: Generic views Version:
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In django/views/generic/

        c = Context(request, {
            'page': page + 1,
            'next': page + 1,
            'previous': page - 1,
            'pages': paginator.pages,

'page' is set to the same value as 'next'.

Change History (1)

comment:1 Changed 14 years ago by Jacob

Resolution: invalid
Status: newclosed

This is, actually, correct -- page is designed to be used as

   Page {{ page }} of {{ pages }}

(i.e. "Page 3 of 5"). So page is one-indexed, but next and prev are zero-indexed.

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