# HG changeset patch # User Oscar Cortez # Date 1665075050 18000 # Thu Oct 06 11:50:50 2022 -0500 # Node ID 7c6672e10f46344a57ed0842a3850bd35a8657a4 # Parent d845b3df41b03f8e369e2d8a5c7471a243b701d9 Add support for Django 4.0 diff --git a/nlotp/__init__.py b/nlotp/__init__.py --- a/nlotp/__init__.py +++ b/nlotp/__init__.py @@ -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(): diff --git a/nlotp/middleware.py b/nlotp/middleware.py --- a/nlotp/middleware.py +++ b/nlotp/middleware.py @@ -11,6 +11,8 @@ class OTPCheckMiddleware(OTPMiddleware, MiddlewareMixin): + _is_coroutine = False + def __call__(self, request): return MiddlewareMixin.__call__(self, request) @@ -34,7 +36,10 @@ 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