25.1 Introduction
Signals are a little bit of an oddity for Django. Everything in the core parts of the framework is tightly coupled. It would be difficult to change the HTTP request/response cycle, just as it would be difficult to replace Django’s object-relational mapper (ORM) with a third-party ORM.
There are several exceptions. Django provides loose coupling for templates. The template system, starting in Django 1.8, allows for other template engines (such as Jinja2) to be plugged right into Django. This is one kind of loose coupling.
The other major exception is signals, and this is a different kind of loose coupling, much more in line with the messages app’s loose coupling. Based on Python’s own signal package, the system allows for event ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access