`manage.py` (do not) sends ANSI escape sequences when terminal (can) can't handle them
|Reported by:||rabio||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
manage.py may sends ANSI escape sequences for output colourization. Unfortunately, guessing if terminal support colours is broken. Guessing if output colourisation is desirable do not take all possible use cases into account.
As it is now, partial checking is made (only platform is checked by django.core.management.color.supports_color()) and manage.py may sends colour codes even when terminal can not handle them properly (as it is a case for most, if not all, dumb terminals).
For guessing to work correctly, checking if terminal can handle colours need to be reimplemented. For this, potentially curses.has_colors() could be used but I'm not sure is it supported on windows, though. In addition, django.utils.termcolors allow to request "blink" option (fortunately not used in default palettes), but not all terminals that support colours know how to blink.