Changes between Initial Version and Version 1 of Ticket #27645, comment 7


Ignore:
Timestamp:
Oct 11, 2024, 2:17:03 PM (5 weeks ago)
Author:
Clifford Gama

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27645, comment 7

    initial v1  
    11The presence of an `INSTALLED_APPS` check in `Settings.__init__()` make this very difficult to solve:
    22
    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().`
     3When 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
     5An additional challenge in making that work is properly processing the errors as done in `BaseCommand.check().`
    46
    57Supposing that were addressed, then additionally, accessing Django like this:
Back to Top