...
from django.views.generic import ListView
...
class RecordsListView(ListView):
template_name = 'record_list_view.html'
model = Record
paginate_by = 10
...
{% for record in object_list %}
...
{% endfor %}
{% if is_paginated %}
<div class="row">
<div class="col-sm-4">
<div class="dataTables_info" id="dynamic-table_info" role="status" aria-live="polite">
Показано с {{ page_obj.start_index }} по {{ page_obj.end_index }} из {{ page_obj.paginator.count }} результатов
</div>
</div>
<div class="col-sm-2">
<div class="dataTables_paginate paging_simple_numbers" id="dynamic-table_paginate">
<ul class="pagination">
{% if page_obj.has_previous %}
<li class="paginate_button previous" aria-controls="dynamic-table" tabindex="0">
<a href="{% url 'recordt_list'%}?page={{ page_obj.previous_page_number }}{{ search_data|set_search_data }}">Пред.</a>
</li>
{% else %}
<li class="paginate_button disabled previous" aria-controls="dynamic-table" tabindex="0">
<a href="{% url 'ticket_list'%}">Пред.</a>
</li>
{% endif %}
<li class="paginate_button active" aria-controls="dynamic-table" tabindex="0">
<a href="{% url record_list'%}?page={{page_obj.number}}{{ search_data|set_search_data }}">{{ page_obj.number }}</a>
</li>
{% if page_obj.has_next %}
<li class="paginate_button next" aria-controls="dynamic-table" tabindex="0">
<a href="{% url 'rtecord_list'%}?page={{ page_obj.next_page_number }}{{ search_data|set_search_data }}">След.</a>
</li>
{% else %}
<li class="paginate_button next disabled" aria-controls="dynamic-table" tabindex="0">
<a href="{% url 'record_list'%}?page={{ page_obj.paginator.num_pages }}">След.</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endif %}
...