Django signals for decoupled event handling

9636
0

Signals allow different parts of the application to respond to model events without tight coupling. I use post_save for actions after an object is created or updated, like sending notifications or updating related records. The @receiver decorator is cleaner than connect() calls. I'm careful to check created flag to distinguish creation from updates. For heavy operations, I dispatch to Celery tasks instead of blocking the request. Signals are powerful but can make code harder to trace, so I document them well and use sparingly for cross-app coordination.