Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgiuffrida authored and aleksihakli committed Jul 17, 2022
1 parent 5c4bca6 commit e8293df
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/2_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit e8293df

Please sign in to comment.