diff options
| author | Claude Paroz <claude@2xlibre.net> | 2019-09-26 19:06:35 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-02-18 20:03:44 +0100 |
| commit | 4d973f593932285cd2f765400d915305d8e7333a (patch) | |
| tree | 1cc48fd9e979d77906e522ecad2689d156d1377f /django/middleware/security.py | |
| parent | a34cb5a6d408203f4fbdb364fc9768c026eda224 (diff) | |
Refs #26601 -- Deprecated passing None as get_response arg to middleware classes.
This is the new contract since middleware refactoring in Django 1.10.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'django/middleware/security.py')
| -rw-r--r-- | django/middleware/security.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/middleware/security.py b/django/middleware/security.py index c0877b350a..035c329efb 100644 --- a/django/middleware/security.py +++ b/django/middleware/security.py @@ -6,7 +6,10 @@ from django.utils.deprecation import MiddlewareMixin class SecurityMiddleware(MiddlewareMixin): + # RemovedInDjango40Warning: when the deprecation ends, replace with: + # def __init__(self, get_response): def __init__(self, get_response=None): + self._get_response_none_deprecation(get_response) self.sts_seconds = settings.SECURE_HSTS_SECONDS self.sts_include_subdomains = settings.SECURE_HSTS_INCLUDE_SUBDOMAINS self.sts_preload = settings.SECURE_HSTS_PRELOAD |
