Django consists of a signal dispatcher that helps allow decoupled applications to get notified when actions occur elsewhere in the framework. Django provides a set of built-in signals that basically allow senders to notify a set of receivers when some action is executed. Some of the signals are as follows:
Signal Description
django.db.models.signals.pre_save
django.db.models.signals.post_save
Sent before or after a model’s save() method is called
django.db.models.signals.pre_delete
django.db.models.signals.post_delete
Sent before or after a model’s delete() method or queryset’s delete() method is called
django.db.models.signals.m2m_changed
Sent when Django starts or finishes an HTTP request