Django model save() method not triggering pre_save signal when using bulk_create
I'm converting an old project and Could someone explain I'm relatively new to this, so bear with me... I'm currently facing an issue in my Django application where I need to create multiple objects in a single database call using the `bulk_create` method. However, I have connected a pre-save signal to my model, and it's not being triggered during this bulk operation. I've verified that the signal is correctly set up and works fine when saving individual instances with the `save()` method. Hereβs a simplified version of my signal and model: ```python from django.db import models from django.db.models.signals import pre_save from django.dispatch import receiver class MyModel(models.Model): name = models.CharField(max_length=100) created_at = models.DateTimeField(auto_now_add=True) @receiver(pre_save, sender=MyModel) def mymodel_pre_save(sender, instance, **kwargs): print(f'Preparing to save: {instance.name}') ``` When I try to create multiple objects like this: ```python items = [MyModel(name='Item 1'), MyModel(name='Item 2')] MyModel.objects.bulk_create(items) ``` I expect to see the print statement from my signal, but it never gets executed. Instead, the objects are created in the database without any output. Iβve looked into the Django documentation and confirmed that `bulk_create` intentionally bypasses signals for performance reasons, but I was hoping there might be a way around this without resorting to saving each instance one by one, which would defeat the purpose of using `bulk_create`. Is there a recommended approach or workaround to trigger pre-save logic while using `bulk_create`? Any help would be greatly appreciated! Thanks in advance! I'm working on a web app that needs to handle this. Any ideas what could be causing this? This is part of a larger web app I'm building. For reference, this is a production microservice. Thanks in advance!