This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
forked from zyga/django-pagination
-
-
Notifications
You must be signed in to change notification settings - Fork 34
When PAGINATION_DISABLE_LINK_FOR_FIRST_PAGE is True, the page 1 url links to the current page. #6
Comments
Django 1.10.6, dj-pagination 2.2.1 My template configuration
|
If you submit a pull request I'll create a new PyPI release. 😄 |
Same problem with @christianmlong |
I ended up just using PAGINATION_DISABLE_LINK_FOR_FIRST_PAGE=False. The urls aren't as clean, but it works. |
I believe the problem is that {{ request.path }} is empty on lines 7 and 25 because {{ request }} does not get passed to the pagination template. Pull request pending. I’m using my fork in the meantime and not experiencing this issue anymore. |
Pushed version 2.3 to PyPI: https://pypi.python.org/pypi/dj-pagination |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When PAGINATION_DISABLE_LINK_FOR_FIRST_PAGE is True, the href for the anchor tag for the number 1 page is blank. What this means is, when you click on the number 1, you just stay on the current page instead of going to page 1.
Look at this snippet of generated html. We are on page 4. If you hover over the number 1, the tooltip will show /current/path/?page=4. And, if you click on the number 1, nothing happens. You stay on the current page.
The problem is, the href for page 1 is blank. I think the bug is here, on line 25 of pagination.html.
I think there is another instance of the same problem on line 7 of pagination.html. When you are on page 2, the href for the anchor for the word "previous" is also blank. So if you are on page 2, and you click "previous", you stay on page 2.
The text was updated successfully, but these errors were encountered: