1
0
mirror of https://github.com/django/django.git synced 2025-04-18 06:14:37 +00:00

[1.10.x] Fixed -- Documented that built-in middleware are compatible with MIDDLEWARE and MIDDLEWARE_CLASSES.

Backport of f95bd89e827d6ee46cc6c736dadc25a10ae25fc9 from master
This commit is contained in:
Ville Skyttä 2016-08-09 15:06:47 +03:00 committed by Tim Graham
parent 233ec837f6
commit 630613d719

@ -311,7 +311,8 @@ Upgrading pre-Django 1.10-style middleware
Django provides ``django.utils.deprecation.MiddlewareMixin`` to ease creating
middleware classes that are compatible with both :setting:`MIDDLEWARE` and the
old :setting:`MIDDLEWARE_CLASSES`.
old :setting:`MIDDLEWARE_CLASSES`. All middleware classes included with Django
are compatible with both settings.
The mixin provides an ``__init__()`` method that accepts an optional
``get_response`` argument and stores it in ``self.get_response``.