eneko valero
eneko valero

Reputation: 459

SystemCheckError in my Django website, why do these middleware errors appear?

So I was trying to run a web page in Django and I got these errors while django was checking everything:

SystemCheckError: System check identified some issues:

ERRORS:
?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in 
order to use the admin application.
?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order 
to use the admin application.
?: (admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order 
to use the admin application.

I looked in the Settings file and everything seems correct, those packages that django says are missing are in the MIDDLEWARE section.

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'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',

]

Does anyone know why this appears. Help is much appreciated

Upvotes: 2

Views: 534

Answers (1)

Rename MIDDLEWARE_CLASSES to MIDDLEWARE

Upvotes: 2

Related Questions