From 68f0d5ee8662556b43b645482157fe9aee28bd01 Mon Sep 17 00:00:00 2001 From: Dale O'Brien Date: Mon, 6 Jul 2015 13:18:03 +1000 Subject: [PATCH] Add username to LOCKOUT_TEMPLATE template context So I can use their username in the lockout template, e.g. something like this, --- axes/decorators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/axes/decorators.py b/axes/decorators.py index d8b195a..310be51 100644 --- a/axes/decorators.py +++ b/axes/decorators.py @@ -340,6 +340,7 @@ def lockout_response(request): context = { 'cooloff_time': COOLOFF_TIME, 'failure_limit': FAILURE_LIMIT, + 'username': request.POST.get(USERNAME_FORM_FIELD, '') } return render_to_response(LOCKOUT_TEMPLATE, context, context_instance=RequestContext(request))