from django.dispatch import receiver
from django.db.models.signals import post_migrate

@receiver(post_migrate)
def create_carousel_instance(sender, **kwargs):
    from .models import Carousel

    if not Carousel.objects.exists():
        Carousel.objects.create(
            subtitle_1="Subtitle 1",
            content_1="This is content for slide 1",
            button_text_1="Click Here",
            button_link_1="https://example.com/1",

            subtitle_2="Subtitle 2",
            content_2="This is content for slide 2",
            button_text_2="Learn More",
            button_link_2="https://example.com/2",

            subtitle_3="Subtitle 3",
            content_3="This is content for slide 3",
            button_text_3="Get Started",
            button_link_3="https://example.com/3",
        )
