From e8293df2ad67198cdb915e9877de400985014893 Mon Sep 17 00:00:00 2001 From: Jonathan Giuffrida Date: Wed, 13 Jul 2022 15:56:07 -0500 Subject: [PATCH] Update documentation --- docs/2_installation.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/2_installation.rst b/docs/2_installation.rst index 5d624fe..e001768 100644 --- a/docs/2_installation.rst +++ b/docs/2_installation.rst @@ -23,16 +23,21 @@ After installing the package, the project settings need to be configured. 'axes', ] -**2.** Add ``axes.backends.AxesBackend`` to the top of ``AUTHENTICATION_BACKENDS``:: +**2.** Add ``axes.backends.AxesStandaloneBackend`` to the top of ``AUTHENTICATION_BACKENDS``:: AUTHENTICATION_BACKENDS = [ - # AxesBackend should be the first backend in the AUTHENTICATION_BACKENDS list. - 'axes.backends.AxesBackend', + # AxesStandaloneBackend should be the first backend in the AUTHENTICATION_BACKENDS list. + 'axes.backends.AxesStandaloneBackend', # Django ModelBackend is the default authentication backend. 'django.contrib.auth.backends.ModelBackend', ] + For backwards compatibility, ``AxesBackend`` can be used in place of ``AxesStandaloneBackend``. + The only difference is that ``AxesBackend`` also provides the permissions-checking functionality + of Django's ``ModelBackend`` behind the scenes. We recommend using ``AxesStandaloneBackend`` + if you have any custom logic to override Django's standard permissions checks. + **3.** Add ``axes.middleware.AxesMiddleware`` to your list of ``MIDDLEWARE``:: MIDDLEWARE = [