Add support for Django 4.0
2 files changed, 8 insertions(+), 3 deletions(-)

M nlotp/__init__.py
M nlotp/middleware.py
M nlotp/__init__.py +1 -1
@@ 1,6 1,6 @@ 
 # -*- coding: utf-8 -*-
 default_app_config = "nlotp.apps.NLOTPConfig"
-VERSION = (0, 1, 2, "final", 0)
+VERSION = (0, 1, 3, "final", 0)
 
 
 def get_version():

          
M nlotp/middleware.py +7 -2
@@ 11,6 11,8 @@ from . import settings
 
 
 class OTPCheckMiddleware(OTPMiddleware, MiddlewareMixin):
+    _is_coroutine = False
+
     def __call__(self, request):
         return MiddlewareMixin.__call__(self, request)
 

          
@@ 34,7 36,10 @@ class OTPCheckMiddleware(OTPMiddleware, 
                 if not next_url:
                     next_url = request.path
                 return HttpResponseRedirect(
-                    '{0}?{1}={2}'.format(settings.NLOTP_VERIFY_URL,
-                                         REDIRECT_FIELD_NAME, next_url)
+                    '{0}?{1}={2}'.format(
+                        settings.NLOTP_VERIFY_URL,
+                        REDIRECT_FIELD_NAME,
+                        next_url,
+                    )
                 )
         return None