1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[4.1.x] Fixed #30801 -- Improved guidance for making good use of signals.

Backport of 71e9694856 from main
This commit is contained in:
Joseph Victor Zammit
2022-10-22 18:52:53 +02:00
committed by Carlton Gibson
parent e8ea852f07
commit 018311d481
2 changed files with 35 additions and 23 deletions

View File

@@ -22,6 +22,14 @@ Model signals
The :mod:`django.db.models.signals` module defines a set of signals sent by the
model system.
.. warning::
Signals can make your code harder to maintain. Consider implementing a
helper method on a :ref:`custom manager <custom-managers>`, to
both update your models and perform additional logic, or else
:ref:`overriding model methods <overriding-model-methods>` before using
model signals.
.. warning::
Many of these signals are sent by various model methods like
@@ -550,6 +558,12 @@ Request/response signals
Signals sent by the core framework when processing a request.
.. warning::
Signals can make your code harder to maintain. Consider :doc:`using a
middleware </topics/http/middleware>` before using request/response
signals.
``request_started``
-------------------