#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 |
Description
In django/views/generic/list_detail.py:
c = Context(request, { [...] 'page': page + 1, 'next': page + 1, 'previous': page - 1, 'pages': paginator.pages, })
'page' is set to the same value as 'next'.
Note:
See TracTickets
for help on using tickets.
This is, actually, correct --
page
is designed to be used as(i.e. "Page 3 of 5"). So
page
is one-indexed, butnext
andprev
are zero-indexed.