What is django signals ?

December 20, 2017 677 views
Python Django

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

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:

Have another answer? Share your knowledge.