Signals
There are four signals that defined now, they will be send by models.
-
class tortoise.signals.Signals(value)
Bases: Enum
An enumeration.
-
post_delete =
4
-
post_save =
2
-
pre_delete =
3
-
pre_save =
1
-
tortoise.signals.post_delete(*senders)[source]
Register given models post_delete signal.
- Parameters:
- *senders
Model class
- Return type:
Callable
[[~T], ~T]
-
tortoise.signals.post_save(*senders)[source]
Register given models post_save signal.
- Parameters:
- *senders
Model class
- Return type:
Callable
[[~T], ~T]
-
tortoise.signals.pre_delete(*senders)[source]
Register given models pre_delete signal.
- Parameters:
- *senders
Model class
- Return type:
Callable
[[~T], ~T]
-
tortoise.signals.pre_save(*senders)[source]
Register given models pre_save signal.
- Parameters:
- *senders
Model class
- Return type:
Callable
[[~T], ~T]