mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #32395 -- Allowed capturing stdout of migration signals.
This commit is contained in:
parent
31bebc558b
commit
f23b05696e
6 changed files with 34 additions and 9 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue