Django

Code

root/django/trunk/django/db/models/signals.py

Revision 8223, 0.5 kB (checked in by jacob, 4 months ago)

Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.

Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).

  • Property svn:eol-style set to native
Line 
1 from django.dispatch import Signal
2
3 class_prepared = Signal(providing_args=["class"])
4
5 pre_init = Signal(providing_args=["instance", "args", "kwargs"])
6 post_init = Signal(providing_args=["instance"])
7
8 pre_save = Signal(providing_args=["instance", "raw"])
9 post_save = Signal(providing_args=["instance", "raw", "created"])
10
11 pre_delete = Signal(providing_args=["instance"])
12 post_delete = Signal(providing_args=["instance"])
13
14 post_syncdb = Signal(providing_args=["class", "app", "created_models", "verbosity", "interactive"])
Note: See TracBrowser for help on using the browser.