Skip to main content

check_models_permissions

Validates that model permission names and codenames do not exceed database length limits and ensures custom permissions do not clash with builtin or duplicate codenames. It returns a list of validation errors for the specified app configurations or all models if none are provided.

def check_models_permissions(
app_configs: iterable or None,
**kwargs: dict
) - > list

Validates that model permission names and codenames do not exceed database length constraints and ensures custom permissions do not clash with built-in ones.

Parameters

NameTypeDescription
app_configsiterable or NoneA collection of Django application configurations to inspect; if None, all installed models are checked.
**kwargsdictAdditional keyword arguments passed by the Django system check framework.

Returns

TypeDescription
listA list of Django check error objects containing details about length violations or naming collisions found in the model permissions.