mirror of https://github.com/django/django.git
Fixed #27041 -- Documented that built-in middleware are compatible with MIDDLEWARE and MIDDLEWARE_CLASSES.
This commit is contained in:
parent
8c3bc5cd78
commit
f95bd89e82
|
@ -311,7 +311,8 @@ Upgrading pre-Django 1.10-style middleware
|
||||||
|
|
||||||
Django provides ``django.utils.deprecation.MiddlewareMixin`` to ease creating
|
Django provides ``django.utils.deprecation.MiddlewareMixin`` to ease creating
|
||||||
middleware classes that are compatible with both :setting:`MIDDLEWARE` and the
|
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
|
The mixin provides an ``__init__()`` method that accepts an optional
|
||||||
``get_response`` argument and stores it in ``self.get_response``.
|
``get_response`` argument and stores it in ``self.get_response``.
|
||||||
|
|
Loading…
Reference in New Issue