summaryrefslogtreecommitdiff
path: root/docs/ref/django-admin.txt
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-11-07 18:31:14 +0100
committerClaude Paroz <claude@2xlibre.net>2012-11-07 18:31:14 +0100
commitb1ac329ba9bbcba90d8ced7e16909ed169b1d16e (patch)
treee27103b2bb037699f796fd44d9d33b28b0db6513 /docs/ref/django-admin.txt
parent9a09558e9f20e088b4526fff6374a53e877cf5ec (diff)
Fixed #19115 -- Documented stdout/stderr options for call_command
Thanks d1ffuz0r for helping with the patch.
Diffstat (limited to 'docs/ref/django-admin.txt')
-rw-r--r--docs/ref/django-admin.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index e0b08450e9..a5ed37f25f 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1469,3 +1469,12 @@ Examples::
from django.core import management
management.call_command('flush', verbosity=0, interactive=False)
management.call_command('loaddata', 'test_data', verbosity=0)
+
+Output redirection
+==================
+
+Note that you can redirect standard output and error streams as all commands
+support the ``stdout`` and ``stderr`` options. For example, you could write::
+
+ with open('/tmp/command_output') as f:
+ management.call_command('dumpdata', stdout=f)