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
| Attribute | Type | Description |
|---|---|---|
| help | string = "Checks the entire Django project for potential problems." | Checks the entire Django project for potential problems. |
| requires_system_checks | list = [] | 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
| Name | Type | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
null | Nothing 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
| Name | Type | Description |
|---|---|---|
| app_labels | tuple | A sequence of specific application labels to restrict the scope of the system checks. |
| options | dict | A dictionary of parsed command-line arguments including 'tags', 'deploy', 'list_tags', 'fail_level', and 'databases'. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; results are written to stdout or a CommandError is raised on failure. |