<div>
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
  {% block previouslink %}
  <li {% if not page_obj.has_previous %}class="disabled"{% endif %}>
      <a href="{% if page_obj.has_previous %}?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}{% else %}#{% endif %}">{{ previous_link_decorator|safe }}{% trans "previous" %}</a>
  </li>
  {% endblock previouslink %}

  {% block nextlink %}
  <li {% if not page_obj.has_next %}class="disabled"{% endif %}>
      <a href="{% if page_obj.has_next %}?page{{ page_suffix }}={{ page_obj.next_page_number }}{{ getvars }}{% else %}#{% endif %}">{% trans "next" %}{{ next_link_decorator|safe }}</a>
  </li>
  {% endblock nextlink %}
</div>
{% endif %}
</div>

<div>
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
  {% block previouslink %}
  <li {% if not page_obj.has_previous %}class="disabled"{% endif %}>
      <a id="previous-page" href="{% if page_obj.has_previous %}?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}{% else %}#{% endif %}">{{ previous_link_decorator|safe }}{% trans "previous" %}</a>
  </li>
  {% endblock previouslink %}

  {% block nextlink %}
  <li {% if not page_obj.has_next %}class="disabled"{% endif %}>
      <a id="next-page" href="{% if page_obj.has_next %}?page{{ page_suffix }}={{ page_obj.next_page_number }}{{ getvars }}{% else %}#{% endif %}">{% trans "next" %}{{ next_link_decorator|safe }}</a>
  </li>
  {% endblock nextlink %}
</div>
{% endif %}
</div>

Add id tags to pagination buttons
Add id tags to pagination buttons
