Skip to main content

check_middleware

Validates that AuthenticationMiddleware is defined before LoginRequiredMiddleware in the project settings and returns a list of configuration errors if the requirement is not met.

def check_middleware(
app_configs: list,
**kwargs: dict
) - > list

Validates that the Django middleware configuration is correctly ordered for authentication dependencies.

Parameters

NameTypeDescription
app_configslistA list of installed application configurations to be checked.
**kwargsdictAdditional keyword arguments passed by the Django system check framework.

Returns

TypeDescription
listA list of Django check error objects if the middleware order is invalid, otherwise an empty list.