summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-06-21 12:01:37 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-06-21 12:01:37 +0000
commit8f5236fa359d91acbd67993b76b83ce0cff158f2 (patch)
tree5dca2872cfe2d23f31fba926b5c7f480f42088a7
parentb1b172114aac7e1a169b111bb44895ad144848ff (diff)
[1.2.X] Fixed #13747 -- Reverted documentation suggesting the use of self.stdout/err in management commands in 1.2. Thanks to metamemetics for the report.
Strictly, self.stdout/err is a feature addition; however, it's a feature that is required in order to achieve a massive speedup in the tests and to maintain parity between 1.2.X and trunk tests. However, the feature is completely transparent -- the old technique will work fine, it just isn't as testable. Therefore, we'll treat this as an undocumented feature in the 1.2 branch. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/howto/custom-management-commands.txt9
1 files changed, 1 insertions, 8 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
index 3f5feaa67a..3e7af8a8de 100644
--- a/docs/howto/custom-management-commands.txt
+++ b/docs/howto/custom-management-commands.txt
@@ -62,14 +62,7 @@ look like this:
poll.opened = False
poll.save()
- self.stdout.write('Successfully closed poll "%s"\n' % poll_id)
-
-.. note::
- When you are using management commands and wish to provide console
- output, you should write to ``self.stdout`` and ``self.stderr``,
- instead of printing to ``stdout`` and ``stderr`` directly. By
- using these proxies, it becomes much easier to test your custom
- command.
+ print 'Successfully closed poll "%s"' % poll_id
The new custom command can be called using ``python manage.py closepoll
<poll_id>``.