How would you audit a Django codebase?

I asked this question shortly after DjangoConEU 2023 and got some interesting responses from the community. Broadly it would seem the places to start when approaching an existing codebase for the first time is the settings file, then URLS and dependencies. After this it's views, tests and models.

From a tools perspective django-debug-toolbar, and IDE tooling are used to quickly understand what is going. That said I do think there is some gaps in the tooling that could be filled. I mentioned one the other day. Another idea along a similar line would be getting attempting to get a complete understanding of the CSS coverage (assuming you are not using something like TailwindCSS) for a project. I think this should be possible given we could render every template across a project, then analysing which CSS statements are being used or not (media queries would be tricky though!).

I also wonder if there are some sensible hueristics that could help, for example ensuring the length of a file doesn't exceed a certain amount of lines? Which I am sure existing linting tools cover.

What other ideas would you like to see help you out? Or are there any other tools that I have missed?