My settings.py file has the default MIDDLEWARE settings generated by django-admin startapp:
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
But when I visit /admin I get an Attribute Error with a traceback that lists
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware']
And Request_Information - Settings that lists:
| MIDDLEWARE_CLASSES | ['django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware'] |
I am thinking of editing my settings file to read MIDDLEWARE_CLASSES instead of MIDDLEWARE (because of stack-overflow articles) but according to the Django Documentation that will only sweep the problem under the rug rather than addressing the issue. I don't see why, at this point, I should deviate from the default settings. Or, what caused the problem in the first place.
Any help would be appreciated.