« В начало {% if page_obj.has_previous %} Назад {% else %} Назад {% endif %}
{% if page_obj.has_next %} Далее {% else %} Далее {% endif %} В конец »