Opened 5 years ago

Closed 5 years ago

#25234 closed New feature (wontfix)

Add an option to disable System Checks

Reported by: Marcin Nowak Owned by: nobody
Component: Core (Management commands) Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I need to disable whole system checks. I don't need them. Silencing is not a solution, because still prints lots of unwanted messages and slowdowns command`s startup.

You can add condition based on DISABLE_SYSTEM_CHECKS setting in django.core.checks.registry.CheckRegistry.run_checks:

    def run_checks(self, app_configs=None, tags=None, include_deployment_checks=False):
        """ Run all registered checks and return list of Errors and Warnings.
        """
        if getattr(settings, 'DISABLE_SYSTEM_CHECKS', None):
            return []

This should be enough to disable checks, but Django still prints out:

Performing system checks...

System check identified no issues (0 silenced).

I would like to make complete patch / pull requests, if you will accept an idea o disabiling system checks.

Change History (3)

comment:1 Changed 5 years ago by Simon Charette

What about re-using SILENCED_SYSTEM_CHECKS with an '__all__' value instead?

comment:2 Changed 5 years ago by Tim Graham

Summary: Possibility to disable System ChecksAdd an option to disable System Checks

comment:3 Changed 5 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

I'm not yet convinced there is a strong demand for disabling all checks instead of disabling the ones that you don't find useful or give false-positives on your project. Will happily reopen if the mailing list discussion decides otherwise.

Note: See TracTickets for help on using tickets.
Back to Top