<nav aria-label="..."> <ul class="pager"> {% if paginator.previous_page %} <li class="previous"><a href="{{ paginator.previous_page_path }}"><span aria-hidden="true">←</span> Newer</a></li> {% endif %} {% if paginator.next_page %} <li class="next"><a href="{{ paginator.next_page_path }}">Older <span aria-hidden="true">→</span></a></li> {% endif %} </ul> </nav>