mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #30801 -- Improved guidance for making good use of signals.
This commit is contained in:
parent
57c2e5da71
commit
71e9694856
2 changed files with 35 additions and 23 deletions
|
@ -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``
|
||||
-------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue