/ admin /'WSGIRequest'对象的AttributeError没有属性'user'(django2.1.1)

时间:2019-07-11 07:23:52

标签: python-3.x

大佬们好,我python3 + django2.1.1使用admin后台报错内容这样AttributeError at / admin / “ WSGIRequest”对象没有属性“ user”

 MIDDLEWARE_CLASSES=[

'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',

'django.middleware.security.SecurityMiddleware',

 #    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',

'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',]

0 个答案:

没有答案