<nav>
  <ul class="pager">
  {% if page_obj.has_previous %}
    <li>
        <a href="?page={{ page_obj.previous_page_number }}">Previous</a>
    </li>
  {% endif %}
  {% if page_obj.has_next %}
    <li>
        <a href="?page={{ page_obj.next_page_number }}">Next</a>
    </li>
  {% endif %}
</ul>
</nav>
