Fixed #23663 -- Initialize output streams for BaseCommand in __init__().

This helps with testability of management commands.

Thanks to trac username daveoncode for the report and to
Tim Graham and Claude Paroz for the reviews.
This commit is contained in:
Loic Bistuer 2014-10-22 01:11:31 +07:00
parent 494cd857c8
commit 533532302a
4 changed files with 104 additions and 29 deletions

View file

@ -1,9 +0,0 @@
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Test color output"
requires_system_checks = False
def handle(self, **options):
return self.style.SQL_KEYWORD('BEGIN')