3 | | When using management commands, `settings` are configured before system checks are run because [https://github.com/django/django/blob/263f7319192b217c4e3b1eea0ea7809836392bbc/django/core/management/__init__.py#L381-L416 ManagementUtility.execute()] tries to configure the `settings` before executing commands; `Command`s are then responsible for running the checks they need to properly execute. This necessitates that the checks for this ticket should somehow run independently of other checks, before them, exiting if errors are found (otherwise other checks will crash because `INSTALLED_APPS` invalid). An additional challenge here being properly processing the errors as done in `BaseCommand.check().` |
| 3 | When using management commands, `settings` are configured before system checks are run because [https://github.com/django/django/blob/263f7319192b217c4e3b1eea0ea7809836392bbc/django/core/management/__init__.py#L381-L416 ManagementUtility.execute()] tries to configure the `settings` before executing commands; `Command`s are then responsible for running the checks they need to properly execute. This necessitates that the checks for this ticket should somehow run independently of other checks, before them, exiting if errors are found (otherwise other checks will crash if `INSTALLED_APPS` invalid). |
| 4 | |
| 5 | An additional challenge in making that work is properly processing the errors as done in `BaseCommand.check().` |