Fixed #30801 -- Improved guidance for making good use of signals.

This commit is contained in:
Joseph Victor Zammit 2022-10-22 18:52:53 +02:00 committed by Carlton Gibson
parent 57c2e5da71
commit 71e9694856
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
@ -546,6 +554,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``
-------------------