diff -pruN 3.7-2/debian/changelog 3.7-3/debian/changelog
--- 3.7-2/debian/changelog	2021-11-03 16:18:18.000000000 +0000
+++ 3.7-3/debian/changelog	2022-07-30 21:49:13.000000000 +0000
@@ -1,3 +1,12 @@
+python-django-csp (3.7-3) unstable; urgency=medium
+
+  * Add patch for Django 4 compatibility (Closes: #1013555).
+  * Bump Standards-Version to 4.6.1.0.
+  * Depend on python3-all for autopkgtests.
+  * Update year in d/copyright.
+
+ -- Michael Fladischer <fladi@debian.org>  Sat, 30 Jul 2022 21:49:13 +0000
+
 python-django-csp (3.7-2) unstable; urgency=low
 
   [ Debian Janitor ]
diff -pruN 3.7-2/debian/control 3.7-3/debian/control
--- 3.7-2/debian/control	2021-11-03 16:18:18.000000000 +0000
+++ 3.7-3/debian/control	2022-07-30 21:49:13.000000000 +0000
@@ -13,7 +13,7 @@ Build-Depends:
  python3-pytest-django,
  python3-setuptools,
  python3-sphinx,
-Standards-Version: 4.6.0.1
+Standards-Version: 4.6.1.0
 Homepage: https://github.com/mozilla/django-csp/
 Vcs-Browser: https://salsa.debian.org/python-team/packages/python-django-csp
 Vcs-Git: https://salsa.debian.org/python-team/packages/python-django-csp.git
diff -pruN 3.7-2/debian/copyright 3.7-3/debian/copyright
--- 3.7-2/debian/copyright	2021-11-03 16:18:18.000000000 +0000
+++ 3.7-3/debian/copyright	2022-07-30 21:49:13.000000000 +0000
@@ -8,7 +8,7 @@ Copyright: 2013, Mozilla Foundation
 License: BSD-3-clause
 
 Files: debian/*
-Copyright: 2018, Michael Fladischer <fladi@debian.org>
+Copyright: 2018-2022, Michael Fladischer <fladi@debian.org>
 License: BSD-3-clause
 
 License: BSD-3-clause
diff -pruN 3.7-2/debian/patches/0002-Django-4-compatibility.patch 3.7-3/debian/patches/0002-Django-4-compatibility.patch
--- 3.7-2/debian/patches/0002-Django-4-compatibility.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.7-3/debian/patches/0002-Django-4-compatibility.patch	2022-07-30 21:49:13.000000000 +0000
@@ -0,0 +1,77 @@
+From: Michael Fladischer <FladischerMichael@fladi.at>
+Date: Sat, 30 Jul 2022 18:56:40 +0000
+Subject: Django 4 compatibility.
+
+---
+ csp/tests/test_context_processors.py | 2 +-
+ csp/tests/test_contrib.py            | 2 +-
+ csp/tests/test_decorators.py         | 2 +-
+ csp/tests/test_middleware.py         | 2 +-
+ csp/tests/utils.py                   | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/csp/tests/test_context_processors.py b/csp/tests/test_context_processors.py
+index 6c4f062..74acb59 100644
+--- a/csp/tests/test_context_processors.py
++++ b/csp/tests/test_context_processors.py
+@@ -5,7 +5,7 @@ from csp.middleware import CSPMiddleware
+ from csp.context_processors import nonce
+ 
+ rf = RequestFactory()
+-mw = CSPMiddleware()
++mw = CSPMiddleware("")
+ 
+ 
+ def test_nonce_context_processor():
+diff --git a/csp/tests/test_contrib.py b/csp/tests/test_contrib.py
+index 33998ab..0571ba8 100644
+--- a/csp/tests/test_contrib.py
++++ b/csp/tests/test_contrib.py
+@@ -6,7 +6,7 @@ from csp.contrib.rate_limiting import RateLimitedCSPMiddleware
+ 
+ 
+ HEADER = 'Content-Security-Policy'
+-mw = RateLimitedCSPMiddleware()
++mw = RateLimitedCSPMiddleware("")
+ rf = RequestFactory()
+ 
+ 
+diff --git a/csp/tests/test_decorators.py b/csp/tests/test_decorators.py
+index 6f2716e..feffd71 100644
+--- a/csp/tests/test_decorators.py
++++ b/csp/tests/test_decorators.py
+@@ -7,7 +7,7 @@ from csp.middleware import CSPMiddleware
+ 
+ 
+ REQUEST = RequestFactory().get('/')
+-mw = CSPMiddleware()
++mw = CSPMiddleware("")
+ 
+ 
+ def test_csp_exempt():
+diff --git a/csp/tests/test_middleware.py b/csp/tests/test_middleware.py
+index f9413ce..2155826 100644
+--- a/csp/tests/test_middleware.py
++++ b/csp/tests/test_middleware.py
+@@ -10,7 +10,7 @@ from csp.middleware import CSPMiddleware
+ 
+ 
+ HEADER = 'Content-Security-Policy'
+-mw = CSPMiddleware()
++mw = CSPMiddleware("")
+ rf = RequestFactory()
+ 
+ 
+diff --git a/csp/tests/utils.py b/csp/tests/utils.py
+index 7d7814f..59cbae4 100644
+--- a/csp/tests/utils.py
++++ b/csp/tests/utils.py
+@@ -5,7 +5,7 @@ from csp.middleware import CSPMiddleware
+ 
+ 
+ JINJA_ENV = engines['jinja2']
+-mw = CSPMiddleware()
++mw = CSPMiddleware("")
+ rf = RequestFactory()
+ 
+ 
diff -pruN 3.7-2/debian/patches/series 3.7-3/debian/patches/series
--- 3.7-2/debian/patches/series	2021-11-03 16:18:18.000000000 +0000
+++ 3.7-3/debian/patches/series	2022-07-30 21:49:13.000000000 +0000
@@ -1 +1,2 @@
 0001-Remove-PEP8-and-flakes-options-from-pytest-call.patch
+0002-Django-4-compatibility.patch
diff -pruN 3.7-2/debian/tests/control 3.7-3/debian/tests/control
--- 3.7-2/debian/tests/control	2021-11-03 16:18:18.000000000 +0000
+++ 3.7-3/debian/tests/control	2022-07-30 21:49:13.000000000 +0000
@@ -1,5 +1,6 @@
 Tests: upstream
 Depends:
+ python3-all,
  @,
  @builddeps@,
 Restrictions: allow-stderr
