Closed
Description
In which file did you encounter the issue?
python-docs-samples/container_engine/django_tutorial/mysite/settings.py
Did you change the file? If so, how?
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
Describe the issue
The admin page fails to run in Django 2.0.3, which is the version used in the Running Django on Kubernetes Engine Tutorial per https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/container_engine/django_tutorial/requirements.txt
- "Support for old-style middleware using settings.MIDDLEWARE_CLASSES is removed." via https://docs.djangoproject.com/en/2.0/releases/2.0/#features-removed-in-2-0
- "The SessionAuthenticationMiddleware class is removed. It provided no functionality since session authentication is unconditionally enabled in Django 1.10." via https://docs.djangoproject.com/en/2.0/releases/2.0/#miscellaneous