Answer the question
In order to leave comments, you need to log in
Django admin and login stopped working after update?
Hello everyone
I updated django to version 2xx, authorization and admin panel stopped working
___ I get an
error:
AttributeError at /gates/
'WSGIRequest' object has no attribute 'user'
Request Method: GET
Request URL: http://site.ru/gates/
Django Version: 2.0.10
Exception Type: AttributeError
Exception Value:
'WSGIRequest' object has no attribute 'user'
Exception Location: /home/site/proxy/djangoen/lib/python3.4/site-packages/django/contrib/admin/sites.py in has_permission, line 186
Python Executable: /home/site/proxy/djangoen/bin/python3.4
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.redirects.middleware.RedirectFallbackMiddleware' #редиректы
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question