core.management.BaseCommand.style

BaseCommand.style

An instance attribute that helps create colored output when writing to stdout or stderr. For example:

self.stdout.write(self.style.SUCCESS('...'))

See Syntax coloring to learn how to modify the color palette and to see the available styles (use uppercased versions of the “roles” described in that section).

If you pass the --no-color option when running your command, all self.style() calls will return the original string uncolored.

doc_Django
2016-10-09 18:34:56
Comments
Leave a Comment

Please login to continue.