Django - Signals
Given this code snippet, what will be printed when a
Book instance is saved?
from django.db.models.signals import post_save
from django.dispatch import receiver
@receiver(post_save, sender=Book)
def notify(sender, instance, **kwargs):
print(f"Book saved: {instance.title}")
book = Book(title='Django Basics')
book.save()