diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
index bfcea64..7a31fc4 100644
a
|
b
|
look like this:
|
65 | 65 | |
66 | 66 | self.stdout.write('Successfully closed poll "%s"' % poll_id) |
67 | 67 | |
| 68 | .. _management-commands-output: |
| 69 | |
68 | 70 | .. note:: |
69 | 71 | When you are using management commands and wish to provide console |
70 | 72 | output, you should write to ``self.stdout`` and ``self.stderr``, |
71 | 73 | instead of printing to ``stdout`` and ``stderr`` directly. By |
72 | 74 | using these proxies, it becomes much easier to test your custom |
73 | | command. |
| 75 | command. Note also that you don't need to end messages with a newline |
| 76 | character, it will be added automatically, unless you specify the ``ending`` |
| 77 | parameter:: |
| 78 | |
| 79 | self.stdout.write("Unterminated line", ending='') |
74 | 80 | |
75 | 81 | The new custom command can be called using ``python manage.py closepoll |
76 | 82 | <poll_id>``. |
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index a5ce08a..03e4855 100644
a
|
b
|
Django 1.5 also includes several smaller improvements worth noting:
|
253 | 253 | from :ref:`call_command <call-command>`. Any exception raised by the command |
254 | 254 | (mostly :ref:`CommandError <ref-command-exceptions>`) is propagated. |
255 | 255 | |
| 256 | Moreover, when you output errors or messages in your custom commands, you |
| 257 | should now use ``self.stdout.write('message')`` and |
| 258 | ``self.stderr.write('error')`` (see the note on |
| 259 | :ref:`management commands output <management-commands-output>`). |
| 260 | |
256 | 261 | * The dumpdata management command outputs one row at a time, preventing |
257 | 262 | out-of-memory errors when dumping large datasets. |
258 | 263 | |