Skip to content

Commit

Permalink
fix: Quick fix to allow first/last page buttons to work
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo authored Dec 24, 2024
1 parent ae4dd36 commit 46f7878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/paginator/snippet.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link pag-item"
href="?page=1{% if request.GET %}&{{ request.GET.urlencode }}{% endif %}">&laquo;</a>
href="?page=1">&laquo;</a>
<a class="page-link pag-item" href="?page={{ page_obj.previous_page_number }}{% if request.GET %}&{{ request.GET|format_GET }}{% endif %}">&lt;</a>
</li>
{% else %}
Expand All @@ -24,7 +24,7 @@
{% if page_obj.has_next %}
<li class="page-item">
<a class="page-link pag-item" href="?page={{ page_obj.next_page_number }}{% if request.GET %}&{{ request.GET|format_GET }}{% endif %}">&gt;</a>
<a class="page-link pag-item" href="?page={{ page_obj.paginator.num_pages }}{% if request.GET %}&{{ request.GET|format_GET }}{% endif %}">&raquo;</a>
<a class="page-link pag-item" href="?page={{ page_obj.paginator.num_pages }}">&raquo;</a>
</li>
{% else %}
<li class="page-item disabled">
Expand Down

1 comment on commit 46f7878

@JasonLovesDoggo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a better fix is to add a templatetag to remove page: value from the QueryDict but this is an easier fix

Please sign in to comment.