{% if is_paginated %}
  <nav aria-label="Page navigation">
    <ul class="pagination">
      <li class="page-item">
      {% if page_obj.has_previous %}
      <a href="?page={{ page_obj.previous_page_number }}{{ parameters }}" class="page-link">
            Previous
        </a>
      {% else %}
        <a href="#" class="page-link">
            Previous
        </a>
      {% endif %}
      </li>
      {% for num in page_obj.paginator.page_range %}
        <li class="page-item">
            <a class="page-link" href="?page={{ num }}{{ parameters }}">{{ num }}</a>
        </li>
      {% endfor %}
      <li class="page-item">
      {% if page_obj.has_next %}
      <a class="page-link" href="?page={{ page_obj.next_page_number }}{{ parameters }}">
            Next
        </a>
      {% else %}
        <a class="page-link" href="#">
            Next
        </a>
      {% endif %}
      </li>
    </ul>
  </nav>
{% endif %}
