From 860e8b32adb3ce7b402154442e7a372a0c07e43d Mon Sep 17 00:00:00 2001 From: Jake Stockwin Date: Wed, 16 Oct 2019 14:51:03 +0100 Subject: [PATCH] Return cooloff timedelta as context variable Closes https://github.com/jazzband/django-axes/issues/502 --- axes/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/axes/helpers.py b/axes/helpers.py index 150b04e..7b621c8 100644 --- a/axes/helpers.py +++ b/axes/helpers.py @@ -288,7 +288,8 @@ def get_lockout_response(request, credentials: dict = None) -> HttpResponse: { "cooloff_time": get_cool_off_iso8601( cool_off - ) # differing old name is kept for backwards compatibility + ), # differing old name is kept for backwards compatibility + "cooloff_timedelta": cool_off, } )