'Custom Mixin is not showing up

I'm not getting any errors but the carousel not showing up in my

content/views.py

class IndexView(CarouselObjectMixin, ListView):
    model = Post
    template_name = 'index.html'
    cats = Category.objects.all()
    ordering = ['-post_date']
    ordering = ['-id']

    def get_context_data(self, *args, **kwargs):
        cat_menu = Category.objects.all()
        context = super(IndexView, self).get_context_data(*args, **kwargs)
        context["cat_menu"] = cat_menu
        return context

maybe their is something wrong with my custom mixin itself, I'm not sure if I build it correctly.

slideshow/views.py

class SlideShowView(ListView):
    model = Carousel
    context_object_name = 'carousel'
    template_name = 'showcase.html'

Custom Mixin

class CarouselObjectMixin(object):
    model = Carousel
    context_object_name = 'carousel'
    template_name = 'showcase.html'

slideshow/templates/showcase.html

{% extends 'base.html' %}
{% load static %}
{% block content %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" />
<!-- Showcase -->
<body>
<section class="bg-transparent text-dark text-center">
    
    <div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
      <div class="carousel-inner">
       {% for object in carousel %}
        <div class="carousel-item {% if forloop.counter0 == 0 %} active {% endif %}">
          <img src="{{object.image.url}}" class="d-block w-100" alt="...">
        </div>
        {% endfor %}
      </div>
      <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Previous</span>
      </button>
      <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Next</span>
      </button>
    
  </div> 
  </section>
<!-- Post -->
</body>
{% endblock %}

slideshow/models.py

class Carousel(models.Model):
    title = models.CharField(max_length=255, blank=True)
    description = models.TextField(max_length=255, blank=True)
    image = models.ImageField(upload_to="showcase/%y/%m/%d/", blank=True)
    
    def __str__(self):
        return self.title


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source