explain_model
Run all Django model safety checks in one pass to reveal correlated risks invisible to single analyzers, such as unscoped ownership with permissive serialization.
Instructions
Everything known about one model, and the risks only visible combined.
Start here when meeting a model for the first time. It runs the structural,
ownership, deletion, signal, exposure, index and datetime checks and returns
one picture instead of seven reports.
The part worth reading is `correlated_risks`. Some defects exist only in the
overlap and no single analyser can see them: a model that is owned, read
without scoping, and serialised with fields = "__all__" is a complete path
from a URL to another customer's row, while each of those three alone is
just a warning.
Args:
model_label: "app_label.ModelName".
tenant_root: the model that owns data, for the ownership half.
include_raw: attach the full report from each analyser as well.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_raw | No | ||
| model_label | Yes | ||
| tenant_root | No | auth.User |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||