进不去admin,都是按照老师的步骤来的,求大神!
求大神,都是按照老师的步骤来的,给出了
'WSGIRequest' object has no attribute 'user'这样的错误
求大神,都是按照老师的步骤来的,给出了
'WSGIRequest' object has no attribute 'user'这样的错误
2018-05-20
目测是你的settings.py文件有问题
找到MIDDLEWARE_CLASSES那个参数那里,修改为:
MIDDLEWARE_CLASSES = (
'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.middleware.security.SecurityMiddleware',
)
举报