Skip to content

Commit

Permalink
templates: replace ifequal templatetag by if
Browse files Browse the repository at this point in the history
ifequal templatetag is deprecated in Django 3.1, removed in Django 4.0
  • Loading branch information
sandre35 committed Jan 9, 2024
1 parent 5b0e3f6 commit 08fc03e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dj_pagination/templates/pagination/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
{% if display_page_links %}
{% for page in pages %}
{% if page %}
{% ifequal page page_obj.number %}
{% if page == page_obj.number %}
<span class="current page">{{ page }}</span>
{% else %}
{% if disable_link_for_first_page and page == 1 %}
<a href="{{ request.path }}{% if getvars %}?{{ getvars|slice:"1:" }}{% endif %}" class="page">{{ page }}</a>
{% else %}
<a href="?page{{ page_suffix }}={{ page }}{{ getvars }}" class="page">{{ page }}</a>
{% endif %}
{% endifequal %}
{% endif %}
{% else %}
...
{% endif %}
Expand Down

0 comments on commit 08fc03e

Please sign in to comment.