--- description: Guidance on using Django middleware for cross-cutting concerns like authentication, logging, and caching. globs: **/middleware.py --- - Use middleware judiciously to handle cross-cutting concerns like authentication, logging, and caching. - Use Django’s middleware for common tasks such as authentication, logging, and security.