hello , can any explain what is django signals and how does it work?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

To quote the Django documentation:

Django includes a “signal dispatcher” which helps allow decoupled applications get notified when actions occur elsewhere in the framework. In a nutshell, signals allow certain senders to notify a set of receivers that some action has taken place. They’re especially useful when many pieces of code may be interested in the same events.

Essentially, they allow you to send a “signal” when an event takes place so that other parts of your application can respond. This blog post gives a good practical introduction:

Submit an Answer