Browse files

[1.5.x] Fixed #19115 -- Documented stdout/stderr options for call_com…


Thanks d1ffuz0r for helping with the patch.
Backport of b1ac329 from master.
  • Loading branch information...
1 parent 34d0c30 commit b8726179249ede88c988c13fd4b1077e49e8b151 @claudep claudep committed Nov 7, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/ref/django-admin.txt
9 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)

0 comments on commit b872617

Please sign in to comment.