Remove the bottom two duplicate middleware  already present and try again

On Sun, Apr 7, 2019, 3:28 PM Saeed Pooladzadeh <[email protected]> wrote:

> Hello
>
> I've added an external library in django. I have installed in installed
> apps but when I try to migrate the model I keep getting this error:
>
> 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.
> The interactive Python process has exited.
> The interactive Python process has exited.
>
> and my middleware is this:
>
> 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',
>     'django.contrib.auth.middleware.AuthenticationMiddleware',
>     'django.contrib.messages.middleware.MessageMiddleware'
> ]
>
> Also my IDE is visual studio.
>
> Please inform me.
>
> Saeed
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/40cb99e0-bb41-4f46-ab69-a8701e3d8de9%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/40cb99e0-bb41-4f46-ab69-a8701e3d8de9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF%2BYYc5iYMSVrhg7zO8JZ7TnkYTcNRLv9SF2jUFvHUJgnJFTcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to