Changes between Version 26 and Version 27 of Signals
- Timestamp:
- Aug 8, 2008, 8:31:55 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Signals
v26 v27 12 12 == How signals work == 13 13 14 A signal is just a simple Python object, and requires nothing special to set up. For example, the `post_save` signal, found in `django.db.models.signals`, is defined like so:14 A signal is an instance of django.dispatch.Signal acting as reference point for a single activity, and requires nothing special to set up. For example, the `post_save` signal, found in `django.db.models.signals`, is defined like so: 15 15 16 16 {{{ … … 18 18 }}} 19 19 20 When a piece of code wants to send a signal, it needs to do t hreethings:20 When a piece of code wants to send a signal, it needs to do two things: 21 21 22 22 1. Import the signal from wherever it's been defined.