try to make MIDDLEWARE_CLASSES to MIDDLEWARE first, you didn't mentioned 
the version of django and the extension you installed.

On Sunday, April 7, 2019 at 3:58:18 PM UTC+6, Saeed Pooladzadeh 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/26cdf25a-0aa3-4803-a0a8-541ee9501201%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to