views:
class catalog(LoginRequiredMixin, ListView):
paginate_by = 2
model = Releaseinfo
template_name = 'plohoymusicapp/catalog.html'
context_object_name = 'release'
login_url = '/login/'
def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data(**kwargs)
context['title'] = 'Каталог'
return context
catalog.html:
{% extends 'plohoymusicapp/base.html' %}
{% load static %}
{% block head %}
<link rel="stylesheet" href="{% static 'plohoymusicapp/css/catalog.css' %}" media="screen">
<link href="https://fonts.googleapis.com/css?family=Inter&display=swap" rel="stylesheet" />
<link rel="shortcut icon" href="{% static 'plohoymusicapp/images/plohoymusic.ico' %}" type="image/x-icon" />
<title>{{ title }}</title>
{% endblock %}
{% block release %}
<div class="v15_3">
<div class="test">
<div class="title_name_div2">
<div class="title_name_div3">
<h1>Название</h1>
</div>
<div class="title_name_div4">
<h1>Артист</h1>
</div>
<div class="title_name_div5">
<h1>Жанр</h1>
</div>
<div class="title_name_div6">
<h1>UPC</h1>
</div>
<div class="title_name_div7">
<h1>Дата</h1>
</div>
<div class="plus_div"><a class="log2" href="{% url 'createrelease' %}"></a></div>
</div>
{% for i in release %}
<div class="pk_name_div">
<h1 class="g4">{{i.pk}}</h1>
</div>
<div class="title_name_div">
<h1><a class="log2" href="{% url 'show_release' i.pk %}"></a>{{i.title}}</h1>
</div>
<div class="artis_name_div">
<h1 class="artist_name">{{i.artist}}</h1>
</div>
<div class="upc_name_div">
<h1>{{i.UPC}}</h1>
</div>
<div class="genre_name_div">
<h1>{{i.genre}}</h1>
</div>
<div class="date_name_div">
<h1>{{i.date}}</h1>
<div class="button-smart-link">
<span class="log3"><a class="log2" href="{% url 'smart-link' i.pk %}"></a>Смарт-линк</span>
</div>
</div>
<div class="drive_div"></div>
<div class="delete_div"><a class="link_div" href="#"></a></div>
<div class="edit_div"><a class="link_div" href="#"></a></div>
<div class="line_div"></div>
<div class="pk_name_div">
<h1 class="g4">{{i.pk}}</h1>
</div>
{% endfor %}
</div>
<nav class="list_pages">
<ul>
{% for p in paginator.page_range %}
<li class="page-num">
<a href="?page={{ p }}">{{ p }}</a>
</li>
{% endfor %}
</ul>
</nav>
</div>
{% endblock release %}
Сами страницы есть, а отображаются все элементы, вместо нескольких.