django-axes/docs/usage.rst
Aleksi Häkli 677d4c48f4
Improve documentation
- Add information on handlers
- Document configuration options and precedences
- Restructure documentation for better readability

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 17:04:03 +02:00

27 lines
No EOL
1.2 KiB
ReStructuredText

Usage
=====
Once Axes is is installed and configured, you can login and logout
of your application via the ``django.contrib.auth`` views.
The attempts will be logged and visible in the Access Attempts section in admin.
By default, Axes will lock out repeated access attempts from the same IP address.
You can allow this IP to attempt again by deleting relevant AccessAttempt records.
Records can be deleted, for example, by using the Django admin application.
You can also use the ``axes_reset``, ``axes_reset_ip``, and ``axes_reset_username``
management commands with the Django ``manage.py`` command helpers:
- ``python manage.py axes_reset``
will reset all lockouts and access records.
- ``python manage.py axes_reset_ip ip [ip ...]``
will clear lockouts and records for the given IP addresses.
- ``python manage.py axes_reset_username username [username ...]``
will clear lockouts and records for the given usernames.
In your code, you can use the ``axes.attempts.reset`` function.
- ``reset()`` will reset all lockouts and access records.
- ``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.