Skip to main content

Command

This class provides a command-line interface for scanning an entire project to identify potential configuration and system problems. It supports filtering checks by specific application labels or tags, auditing deployment settings, and listing available diagnostic tags. Users can also specify a failure threshold level and target specific database aliases for database-related validations.

Attributes

AttributeTypeDescription
helpstring = "Checks the entire Django project for potential problems."Checks the entire Django project for potential problems.
requires_system_checkslist = []A list of system checks that must be performed before the command is executed, which is empty for this specific command to allow manual check execution.

Methods


add_arguments()

@classmethod
def add_arguments(
parser: [CommandParser](../../base/commandparser.md?sid=django_core_management_base_commandparser)
) - > null

Configures the command-line argument parser with options for filtering checks by app labels, tags, deployment settings, and failure severity levels.

Parameters

NameTypeDescription
parser[CommandParser](../../base/commandparser.md?sid=django_core_management_base_commandparser)The argument parser instance to which system check options like --tag, --deploy, and --fail-level will be added.

Returns

TypeDescription
nullNothing is returned; the parser object is modified in place.

handle()

@classmethod
def handle(
app_labels: tuple,
options: dict
) - > null

Executes the system check logic, which can include listing available tags or running specific validation checks against the project configuration and databases.

Parameters

NameTypeDescription
app_labelstupleA sequence of specific application labels to restrict the scope of the system checks.
optionsdictA dictionary of parsed command-line arguments including 'tags', 'deploy', 'list_tags', 'fail_level', and 'databases'.

Returns

TypeDescription
nullNothing is returned; results are written to stdout or a CommandError is raised on failure.