management.util.output_wrapperยถ

Output wrapper for Django management commands.

Provides an adapter between Djangoโ€™s CommandStyle and our OutputWriter protocol.

Module Contentsยถ

class management.util.output_wrapper.CommandOutputWrapper(stdout, style)[source]ยถ

Adapter for Django command output to match OutputWriter protocol.

Parameters:
  • stdout (django.core.management.base.OutputWrapper)

  • style (django.core.management.color.Style)

write(msg)[source]ยถ

Write a message to stdout.

Parameters:

msg (str) โ€“ The message to write.

Return type:

None

success(msg)[source]ยถ

Format a success message with styling.

Parameters:

msg (str) โ€“ The message to format.

Returns:

The styled message.

Return type:

str

error(msg)[source]ยถ

Format an error message with styling.

Parameters:

msg (str) โ€“ The message to format.

Returns:

The styled message.

Return type:

str

warning(msg)[source]ยถ

Format a warning message with styling.

Parameters:

msg (str) โ€“ The message to format.

Returns:

The styled message.

Return type:

str