Opened 9 years ago

Closed 9 years ago

#25439 closed New feature (fixed)

Add `SUCCESS` style to termcolor palettes

Reported by: Matt Deacalion Stevens Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords: termcolor termcolour colors colours
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Matt Deacalion Stevens)

I've just created a management command that shows if something was successful or whether an error was encountered trying to perform the task. I looked at the palettes in "django/utils/termcolors.py" to find a bold red for displaying the error and found it was called "ERROR".

However, the only bold green style I found was "MIGRATE_SUCCESS", but it feels odd using this in my management command since it has nothing to do with migrations.

Could I add a generic "SUCCESS" style that is the same as "MIGRATE_SUCCESS" or should these styles not be used by third party management commands?

Edit: added a screencap of all the styles.

Attachments (1)

termcolor-styles.png (35.4 KB ) - added by Matt Deacalion Stevens 9 years ago.
Management command termcolors

Download all attachments as: .zip

Change History (6)

by Matt Deacalion Stevens, 9 years ago

Attachment: termcolor-styles.png added

Management command termcolors

comment:1 by Matt Deacalion Stevens, 9 years ago

Description: modified (diff)

comment:2 by Claude Paroz, 9 years ago

Triage Stage: UnreviewedAccepted

Looks like a generic SUCCESS style would be a nice addition.

comment:3 by Matt Deacalion Stevens, 9 years ago

Has patch: set

comment:4 by Claude Paroz, 9 years ago

Triage Stage: AcceptedReady for checkin
Version: 1.8master

comment:5 by Claude Paroz <claude@…>, 9 years ago

Resolution: fixed
Status: newclosed

In f06ce605:

Fixed #25439 -- Added SUCCESS style to termcolor palettes

Note: See TracTickets for help on using tickets.
Back to Top