Fixed #32395 -- Allowed capturing stdout of migration signals.

This commit is contained in:
Simon Charette 2021-01-29 10:19:06 -05:00 committed by Mariusz Felisiak
parent 31bebc558b
commit f23b05696e
6 changed files with 34 additions and 9 deletions

View file

@ -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
~~~~~~~~~