diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-11-07 18:31:14 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-11-07 18:36:17 +0100 |
| commit | b8726179249ede88c988c13fd4b1077e49e8b151 (patch) | |
| tree | 6aef45fbc20f6302b573a153836536c38c98b9de /docs | |
| parent | 34d0c30e877739c8a7354ecd878f2ffe9e7c613f (diff) | |
[1.5.x] Fixed #19115 -- Documented stdout/stderr options for call_command
Thanks d1ffuz0r for helping with the patch.
Backport of b1ac329ba from master.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/django-admin.txt | 9 |
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) |
