Issue with Django 2.0 : 'WSGIRequest' object has no attribute 'session'

前端 未结 2 530
感情败类
感情败类 2020-12-20 11:55

I upgraded my Django version from 1.11.5 to 2.0 and I\'m trying to solve different deprecated element.

However, even if my CSS/bootstrap st

相关标签:
2条回答
  • 2020-12-20 12:30

    MIDDLEWARE_CLASSES has been deprecated since Django 1.10 and was removed completely in version 2.0. That means you have no middleware at all.

    You should use the MIDDLEWARE setting instead; note, that uses new-style middleware, you might need to upgrade your custom middleware class.

    0 讨论(0)
  • 2020-12-20 12:46

    So the MIDDLEWARE_CLASSES changed to MIDDLEWARE https://docs.djangoproject.com/en/2.0/topics/http/middleware/#activating-middleware

    0 讨论(0)
提交回复
热议问题