且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

'WSGIRequest'对象没有属性 'user'Django 管理员

更新时间:2021-11-28 22:01:50

要解决这个问题,请转到 settings.py 那里有新样式的 MIDDLEWARE(在 Django 中引入)1.10)

To resolve this go to settings.py where there is new-style MIDDLEWARE (introduced in Django 1.10)

将其更改为旧式MIDDLEWARE_CLASSES

https://docs.djangoproject.com/en/stable/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware