From c2d227f861749b885b0a0030782a46435e8dafdd Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Fri, 26 Jan 2024 12:36:35 -0500 Subject: [PATCH] MiddlewareMixin is always present in django>=3.2 it was added in django 2.0a1 --- csp/middleware.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/csp/middleware.py b/csp/middleware.py index 0e58024..c11b408 100644 --- a/csp/middleware.py +++ b/csp/middleware.py @@ -8,18 +8,7 @@ from django.conf import settings from django.utils.functional import SimpleLazyObject -try: - from django.utils.deprecation import MiddlewareMixin -except ImportError: - - class MiddlewareMixin(object): - """ - If this middleware doesn't exist, this is an older version of django - and we don't need it. - """ - - pass - +from django.utils.deprecation import MiddlewareMixin from csp.utils import build_policy