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
| Name | Type | Description |
|---|---|---|
| app_configs | list | A list of installed application configurations to be checked. |
| **kwargs | dict | Additional keyword arguments passed by the Django system check framework. |
Returns
| Type | Description |
|---|---|
list | A list of Django check error objects if the middleware order is invalid, otherwise an empty list. |