summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJoseph Victor Zammit <jvzammit@gmail.com>2022-10-22 18:52:53 +0200
committerCarlton Gibson <carlton.gibson@noumenal.es>2022-11-02 17:21:15 +0100
commit71e9694856627d4027c9df066045f0e1c2b5cf27 (patch)
tree6626389fa0311185a7f60cf1315ce2f1f6fa1767 /docs/ref
parent57c2e5da710b583110d8c7c20e91774a61d7472f (diff)
Fixed #30801 -- Improved guidance for making good use of signals.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/signals.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt
index d9c07b415c..0e2a701fcd 100644
--- a/docs/ref/signals.txt
+++ b/docs/ref/signals.txt
@@ -24,6 +24,14 @@ 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
``__init__()`` or :meth:`~django.db.models.Model.save` that you can
override in your own code.
@@ -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``
-------------------