#31924: Support --force-color for runserver
-------------------------------------+-------------------------------------
     Reporter:  Zach Waggoner        |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Core (Management     |                  Version:  3.1
  commands)                          |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
  runserver,force_color              |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Zach Waggoner:

Old description:

> Currently, the `--force-color` option doesn't work for the `runserver`
> management command. In my own experimentation, I was able to force color
> output by changing `self.style = color_style()` to `self.style =
> color_style(force_color=True)` in django.utils.log.ServerFormatter. I can
> of course achieve this by using my own django.server formatter class, but
> it would be convenient to have it built in.

New description:

 Currently, the `--force-color` option doesn't work for the `runserver`
 management command. In my own experimentation, I was able to force color
 output by changing `self.style = color_style()` to `self.style =
 color_style(force_color=True)` in `django.utils.log.ServerFormatter`. I
 can of course achieve this by using my own django.server formatter class,
 but it would be convenient to have it built in.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31924#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.b4ac248d12f79b1d48feddd7218c4bc3%40djangoproject.com.

Reply via email to