2008-08-06 23:32:46 +08:00
|
|
|
from django.dispatch import Signal
|
2006-05-02 09:31:56 +08:00
|
|
|
|
2008-08-06 23:32:46 +08:00
|
|
|
class_prepared = Signal(providing_args=["class"])
|
2006-05-02 09:31:56 +08:00
|
|
|
|
2012-12-16 09:53:25 +08:00
|
|
|
pre_init = Signal(providing_args=["instance", "args", "kwargs"], use_caching=True)
|
|
|
|
post_init = Signal(providing_args=["instance"], use_caching=True)
|
2006-05-02 09:31:56 +08:00
|
|
|
|
2012-12-16 09:53:25 +08:00
|
|
|
pre_save = Signal(providing_args=["instance", "raw", "using", "update_fields"],
|
|
|
|
use_caching=True)
|
|
|
|
post_save = Signal(providing_args=["instance", "raw", "created", "using", "update_fields"], use_caching=True)
|
2006-05-02 09:31:56 +08:00
|
|
|
|
2012-12-16 09:53:25 +08:00
|
|
|
pre_delete = Signal(providing_args=["instance", "using"], use_caching=True)
|
|
|
|
post_delete = Signal(providing_args=["instance", "using"], use_caching=True)
|
2008-08-06 23:32:46 +08:00
|
|
|
|
2013-07-30 18:52:52 +08:00
|
|
|
pre_migrate = Signal(providing_args=["app", "create_models", "verbosity", "interactive", "db"])
|
|
|
|
pre_syncdb = pre_migrate
|
2013-08-20 11:14:21 +08:00
|
|
|
post_migrate = Signal(providing_args=["class", "app", "created_models", "verbosity", "interactive", "db"])
|
2013-07-30 18:52:52 +08:00
|
|
|
post_syncdb = post_migrate
|
2010-01-13 19:07:16 +08:00
|
|
|
|
2012-12-16 09:53:25 +08:00
|
|
|
m2m_changed = Signal(providing_args=["action", "instance", "reverse", "model", "pk_set", "using"], use_caching=True)
|