Пагинация на странице карусели с несколькими изображениями в Django

class HomePageView(ListView):
    template_name = "index.html"
    model = ServiceModel
    context_object_name = 'services'

    def customer_listing(self):
        customers = CustomerModel.objects.filter(is_active=True)
        paginator = Paginator(customers, 3)
        return paginator

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['customers_logos'] = CustomerModel.objects.filter(is_active=True)
        context['paginations'] = self.customer_listing()

        return context

На каждой странице карусели должно быть 3 изображения Например, если всего есть 10 изображений, то на страницах должно быть 3 3 3 3 1
. Теперь paginator работает как ожидалось, он создает 4 страницы карусели, но я не могу получить изображения без дублирования.

                    <div class="carousel-inner">
                        {% for pagination in paginations %}
                
                        {% with forloop.counter0 as i %}
                
                        <div class="carousel-item {% if i is 0 %}active{% endif %} ">
                            <div class="row">
                
                                <div class="col-12 col-md d-flex align-items-center justify-content-center">
                                    <img src="" alt="">
                                </div>
                                <div class="col-12 col-md d-flex align-items-center justify-content-center">
                                    <img src="" alt="">
                                </div>
                                <div class="col-12 col-md d-flex align-items-center justify-content-center">
                                    <img src="" alt="">
                
                                </div>
                            </div>
                        </div>
                        {% endwith %}
                        {% endfor %}
                
                
                    </div>
                </div>

Как я могу решить эту проблему?

Вернуться на верх