1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #23107 -- Made runserver output respect --no-color.

This commit is contained in:
areski
2014-07-29 15:18:44 +02:00
committed by Tim Graham
parent 7fcfefbc4a
commit 67d7da5fb9
2 changed files with 2 additions and 0 deletions

View File

@@ -380,6 +380,7 @@ class BaseCommand(object):
if options.get('no_color'):
self.style = no_style()
self.stderr = OutputWrapper(options.get('stderr', sys.stderr))
os.environ["DJANGO_COLORS"] = "nocolor"
else:
self.stderr = OutputWrapper(options.get('stderr', sys.stderr), self.style.ERROR)