Skip to content

Commit 9698258

Browse files
asottile-sentrystevejalim
authored andcommitted
MiddlewareMixin is always present in django>=3.2
it was added in django 2.0a1
1 parent 12116dc commit 9698258

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

csp/middleware.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,9 @@
66
from functools import partial
77

88
from django.conf import settings
9+
from django.utils.deprecation import MiddlewareMixin
910
from django.utils.functional import SimpleLazyObject
1011

11-
try:
12-
from django.utils.deprecation import MiddlewareMixin
13-
except ImportError:
14-
15-
class MiddlewareMixin(object):
16-
"""
17-
If this middleware doesn't exist, this is an older version of django
18-
and we don't need it.
19-
"""
20-
21-
pass
22-
23-
2412
from csp.utils import build_policy
2513

2614

0 commit comments

Comments
 (0)