Django’s system check framework provides fantastic protection for configuration mishaps. It’s like a targeted linter that runs when you start Djan

Django: Write-up on optimizing the system check framework

submited by
Style Pass
2024-03-30 15:30:02

Django’s system check framework provides fantastic protection for configuration mishaps. It’s like a targeted linter that runs when you start Django commands. It takes advantage of runtime setup to inspect the true state rather than infer it from the source.

I love the system check framework: I have contributed to several built-in checks, maintain a package of extra checks, and have a whole chapter on it in Boost Your Django DX.

Unfortunately, the framework has gained a reputation for being slow, at least on larger projects. For example, Jeff Triplett recently tooted:My #Django magic wand would disable checks running on all the things by default unless explicitly turned called or turned on.Q: Why does it take so long to run manage.py for my project?A: Django's manage.py runs checks which scan every Python file by default with apparently no cache and takes double-digit seconds to minutes for non-trivially sized projects with no easy way to disable. You can pass --skip-checks.

A: Django's manage.py runs checks which scan every Python file by default with apparently no cache and takes double-digit seconds to minutes for non-trivially sized projects with no easy way to disable. You can pass --skip-checks.

Leave a Comment