6👍
✅
Django introduced new middleware in Django 1.10. You should use the MIDDLEWARE
setting if you are using new-style middleware, and MIDDLEWARE_CLASSES
if you are using old-style middleware.
If you are using Django 1.10 or 1.11, then the old MIDDLEWARE_CLASSES
setting is still supported, so Django should continue to redirect with the appended slash.
However, once you upgrade to Django 2.0, the MIDDLEWARE_CLASSES
setting is ignored and you must switch over to MIDDLEWARE
.
When you switch over to MIDDLEWARE
, you should remove SessionAuthenticationMiddleware
since it has no effect in 1.10 and 1.11, and is removed completely in Django 2.0.
Source:stackexchange.com