request.POST empty after upgrading from Django 1.11 to Django 2.1

后端 未结 1 435
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 19:39

This post is a follow-up of this previous question:

Django request.POST empty

I had a project up and running with Python 3.5.4 and Django 1.11.13

相关标签:
1条回答
  • 2021-01-24 20:28

    MIDDLEWARE_CLASSES was deprecated in Django 1.10 and removed in Django 2.0. You should be using MIDDLEWARE instead.

    You should remove SessionAuthenticationMiddleware because it hasn't been required since Django 1.10.

    Django 1.11 gives a deprecation warning that you should switch from MIDDLEWARE, but you must have missed this. Before upgrading Django, it's good practice to read the release notes, and fix any deprecation warnings. See the upgrade guide for more info.

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