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 ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.