summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2021-01-29 10:19:06 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-02-04 11:19:49 +0100
commitf23b05696e470fc113c729e18665722ccbb7a9f0 (patch)
tree11d28a1c42bc49c5b35104347c09e2eba17ab6fd /docs
parent31bebc558bf9a647c77ff6b372fc199008e99c1c (diff)
Fixed #32395 -- Allowed capturing stdout of migration signals.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/signals.txt10
-rw-r--r--docs/releases/4.0.txt6
2 files changed, 15 insertions, 1 deletions
diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt
index a4ed248769..4eb55c906a 100644
--- a/docs/ref/signals.txt
+++ b/docs/ref/signals.txt
@@ -424,6 +424,11 @@ Arguments sent with this signal:
For example, the :mod:`django.contrib.auth` app only prompts to create a
superuser when ``interactive`` is ``True``.
+``stdout``
+ .. versionadded:: 4.0
+
+ A stream-like object where verbose output should be redirected.
+
``using``
The alias of database on which a command will operate.
@@ -478,6 +483,11 @@ Arguments sent with this signal:
For example, the :mod:`django.contrib.auth` app only prompts to create a
superuser when ``interactive`` is ``True``.
+``stdout``
+ .. versionadded:: 4.0
+
+ A stream-like object where verbose output should be redirected.
+
``using``
The database alias used for synchronization. Defaults to the ``default``
database.
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt
index 3d94e8a8a9..94782e891f 100644
--- a/docs/releases/4.0.txt
+++ b/docs/releases/4.0.txt
@@ -191,7 +191,11 @@ Serialization
Signals
~~~~~~~
-* ...
+* The new ``stdout`` argument for :func:`~django.db.models.signals.pre_migrate`
+ and :func:`~django.db.models.signals.post_migrate` signals allows redirecting
+ output to a stream-like object. It should be preferred over
+ :py:data:`sys.stdout` and :py:func:`print` when emitting verbose output in
+ order to allow proper capture when testing.
Templates
~~~~~~~~~