Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #19115 -- Documented stdout/stderr options for call_command

Thanks d1ffuz0r for helping with the patch.
  • Loading branch information...
commit b1ac329ba9bbcba90d8ced7e16909ed169b1d16e 1 parent 9a09558
Claude Paroz claudep authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/ref/django-admin.txt
9 docs/ref/django-admin.txt
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.