#6385 closed (duplicate)
Make runserver output colorful HTTP status codes
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | django-admin.py runserver | Version: | dev |
Severity: | Keywords: | color | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
While developing locally and using the built-in server, it is helpful to be able to quickly scan and see 404s, redirects, errors, etc. The attached diff adds 4 HTTP colors for each of the HTTP status codes of 2xx, 3xx, 4xx, and 5xx.
Attachments (3)
Change History (8)
by , 17 years ago
Attachment: | colorize.diff added |
---|
comment:1 by , 17 years ago
PS: This is similar to #1491. I'll also attach a screenshot of it in action.
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
by , 17 years ago
Attachment: | 0021-Colorize-HTTP-server-log-output.patch added |
---|
split off coloring in a separate function
comment:3 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Design decision needed → Accepted |
The most recent patch is a good start; here are a few comments:
1) I'd rather see the whole line colorized - not just the status code.
2) 2XX is a normal success - I'd argue that shouldn't have any colorization. The 3XX case is worth noting (and worth being easy to see), but it probably doesn't need to be bold. The 4XX and 5XX cases are both bad, and should be bold, and in warning colors (yellow/red))
3) Blue is a really bad choice of color for 3XX - its almost invisible on a black background. Green would be a better choice
4) I'd rather see this display code isolated to the development server. By putting it in basehttp, every single Django server will be colorizing - even if that colorization is a no-op. This is an overhead that the dev server can wear, but we shouldn't force onto every WSGI/mod_python/fcgi.
comment:4 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Marking as a duplicate of #7679.
Add HTTP colors to runserver output