Skip to content

Commit

Permalink
MiddlewareMixin is always present in django>=3.2
Browse files Browse the repository at this point in the history
it was added in django 2.0a1
  • Loading branch information
asottile-sentry authored and stevejalim committed Jan 27, 2024
1 parent 12116dc commit 9698258
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions csp/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@
from functools import partial

from django.conf import settings
from django.utils.deprecation import MiddlewareMixin
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 csp.utils import build_policy


Expand Down

0 comments on commit 9698258

Please sign in to comment.