Management

Debug Command

class integreat_cms.core.management.debug_command.DebugCommand(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: LogCommand

Base class for management commands which can only be executed in debug mode

execute(*args: Any, **options: Any) None[source]

Try to run the command

Parameters:
  • *args (Any) – The supplied arguments

  • **options (Any) – The supplied keyword options

Raises:

CommandError – When the input is invalid

Return type:

None

handle(*args: Any, **options: Any) None[source]

The actual logic of the command. Subclasses must implement this method.

Parameters:
  • args (Any) –

  • options (Any) –

Return type:

None

Log Command

class integreat_cms.core.management.log_command.LogCommand(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

Base class for management commands to set the stream handler of the logger to the command’s stdout wrapper

handle(*args: Any, **options: Any) None[source]

The actual logic of the command. Subclasses must implement this method.

Parameters:
  • args (Any) –

  • options (Any) –

Return type:

None

set_logging_stream() None[source]

Set the output stream to the command’s stdout/stderr wrapper. Has to be called as part of the command’s handle() function.

Return type:

None