From 465fe4529d7f2e07ae51dcd8ee9a0fed7377d11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksi=20Ha=CC=88kli?= Date: Sun, 19 May 2019 16:55:53 +0300 Subject: [PATCH] Include documentation notes --- docs/2_installation.rst | 6 +++--- docs/3_usage.rst | 13 ++++++------- docs/4_configuration.rst | 2 +- docs/5_customization.rst | 9 +++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/2_installation.rst b/docs/2_installation.rst index 68245c9..6570ee5 100644 --- a/docs/2_installation.rst +++ b/docs/2_installation.rst @@ -84,9 +84,9 @@ Axes has the following warnings codes built in: .. note: -Only disable the Axes system checks and warnings if you know what you are doing. -The default checks are implemented to verify and improve your project's security -and should only produce necessary warnings due to misconfigured settings. + Only disable the Axes system checks and warnings if you know what you are doing. + The default checks are implemented to verify and improve your project's security + and should only produce necessary warnings due to misconfigured settings. Disabling Axes components in tests diff --git a/docs/3_usage.rst b/docs/3_usage.rst index bdf3320..66d42dc 100644 --- a/docs/3_usage.rst +++ b/docs/3_usage.rst @@ -62,9 +62,8 @@ configuration and customization documentation for further information. .. note:: Please note that the functionality describe here concerns the default - database attempt tracker and handler. If you have customized or changed - the default handler to another class such as the cache handler, - you have to implement custom reset commands for it. + database handler. If you have changed the default handler to another + class such as the cache handler you have to implement custom reset commands. Resetting attempts from the Django admin UI @@ -101,7 +100,7 @@ In your code, you can use the ``axes.utils.reset`` function. - ``reset(ip=ip)`` will clear lockouts and records for the given IP address. - ``reset(username=username)`` will clear lockouts and records for the given username. -Please note that if you give both ``username`` and ``ip`` arguments to ``reset`` -that attempts that have both the set IP and username are reset. - -The effective behaviour of ``reset`` is to ``and`` the terms instead of ``or`` ing them. +.. note: + Please note that if you give both ``username`` and ``ip`` arguments to ``reset`` + that attempts that have both the set IP and username are reset. + The effective behaviour of ``reset`` is to ``and`` the terms instead of ``or`` ing them. diff --git a/docs/4_configuration.rst b/docs/4_configuration.rst index 2840bce..12f18ad 100644 --- a/docs/4_configuration.rst +++ b/docs/4_configuration.rst @@ -124,7 +124,7 @@ with the ``AXES_HANDLER`` setting in project configuration: - ``axes.handlers.dummy.AxesDummyHandler`` does nothing with attempts and can be used to disable Axes handlers if the user does not wish Axes to execute any logic on login signals. - Note that this effectively disables any Axes security features, + Please note that this effectively disables any Axes security features, and is meant to be used on e.g. local development setups and testing deployments where login monitoring is not wanted. diff --git a/docs/5_customization.rst b/docs/5_customization.rst index d08a832..d1a4490 100644 --- a/docs/5_customization.rst +++ b/docs/5_customization.rst @@ -149,7 +149,8 @@ into ``my_namespace-username``: AXES_USERNAME_CALLABLE = 'example.utils.get_username' -NOTE: You still have to make these modifications yourself before calling -authenticate. If you want to re-use the same function for consistency, that's -fine, but Axes does not inject these changes into the authentication flow -for you. +.. note: + You still have to make these modifications yourself before calling + authenticate. If you want to re-use the same function for consistency, that's + fine, but Axes does not inject these changes into the authentication flow + for you.