Complete the code to add a middleware class to the Django settings.
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
[1],
'django.middleware.common.CommonMiddleware',
]The SessionMiddleware manages sessions and should be included in the middleware list.
Complete the code to add a custom middleware class path to the settings.
MIDDLEWARE += [
[1]
]Custom middleware classes are added by specifying their full Python path as a string.
Fix the error in the middleware list by completing the missing middleware.
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.[1]',
'django.middleware.common.CommonMiddleware',
]The correct middleware class for session management is SessionMiddleware.
Fill both blanks to correctly configure middleware that handles authentication and CSRF protection.
MIDDLEWARE = [
[1],
[2],
]The AuthenticationMiddleware manages user authentication, and CsrfViewMiddleware protects against CSRF attacks.
Fill all three blanks to create a middleware list that includes security, session, and clickjacking protection.
MIDDLEWARE = [
[1],
[2],
[3],
]This middleware list includes security features, session management, and protection against clickjacking attacks.