From e6c5d06c3a75abac2d8d483ca0d406606f85aaa3 Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Mon, 13 Oct 2014 17:36:56 +0300 Subject: [PATCH] Update README.rst to document #97 --- README.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6a8b818..bd7e7c1 100644 --- a/README.rst +++ b/README.rst @@ -118,6 +118,8 @@ These should be defined in your ``settings.py`` file. be used. Default: ``None`` * ``AXES_VERBOSE``: If ``True``, you'll see slightly more logging for Axes. Default: ``True`` +* ``AXES_USERNAME_FORM_FIELD``: the name of the form field that contains your + users usernames. Default: ``username`` Usage @@ -146,7 +148,10 @@ In your code, you can use ``from axes.utils import reset``. Issues ====== -You may find that Axes is not capturing my failed login attempt. It may be that you need to manually add watch_login to your login url. +Not being locked out after failed attempts +------------------------------------------ + +You may find that Axes is not capturing your failed login attempts. It may be that you need to manually add watch_login to your login url. For example, in your urls.py:: ... @@ -157,3 +162,14 @@ For example, in your urls.py:: (r'^login/$', watch_login(login), {'template_name': 'auth/login.html'}), ... + +Locked out without reason +------------------------- + +It may happen that you have suddenly become locked out without a single failed +attempt. One possible reason is that you are using some custom login form and the +username field is named something different than "username", e.g. "email". This +leads to all users attempts being lumped together. To fix this add the following +to your settings: + + AXES_USERNAME_FORM_FIELD = "email"