Добавил черновой вариант пагинации и переделал шаблоны
This commit is contained in:
11
music_storage/templates/components/pagination.html
Normal file
11
music_storage/templates/components/pagination.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page={{ page_obj.previous_page_number }}">← Назад</a>
|
||||
{% endif %}
|
||||
|
||||
<span>
|
||||
Страница {{ page_obj.number }} из {{ page_obj.paginator.num_pages }}
|
||||
</span>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}">Вперёд →</a>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user