Changes between Version 1 and Version 2 of Signals


Ignore:
Timestamp:
Jun 18, 2006, 3:17:19 PM (18 years ago)
Author:
Tyson Tate <tyson@…>
Comment:

Added some additional info.

Legend:

Unmodified
Added
Removed
Modified
  • Signals

    v1 v2  
    44
    55The author of Zyons [http://feh.holsman.net/articles/2006/06/13/django-signals talks about signals a bit here].
     6
     7== Built-In Signals ==
     8
     9Django has the following build in signalers:
     10
     11 * class_prepared
     12 * pre_init
     13 * post_init
     14 * pre_save
     15 * post_save
     16 * pre_delete
     17 * post_delete
     18 * post_syncdb
     19
     20All the above are related to classes in your models.py files.
     21
     22== Custom Signals ==
     23
     24You can send custom signals from the dispatcher, as well. In the following example from [http://feh.holsman.net/articles/2006/06/13/django-signals this intro to signals], a signal called "object_viewed" is sent whenever the following bit is called:
     25
     26{{{
     27dispatcher.send(signal=signals.object_viewed, request=request, object=object)
     28}}}
    629
    730== Example ==
Back to Top