The index number starts from the beginning on the second page because the Paginator class is designed to show a subset of data from a larger dataset. Each page displays a fixed number of items (usually 10 or 20) and the index number represents the position of each item within the entire dataset, not just within the current page. Therefore, when moving to the second page, the index must start again from the beginning of the subset displayed on that page.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-15 22:31:06 +0000
Seen: 10 times
Last updated: Jun 15 '23