django-login-history2 is an enhanced version of the "django-login-history" package, providing a simple and effective way to track user login history in a Django project.
- Everything the previous package did
- Support maintained
- We use ipware instead of ipaddress
Install django-login-history2 using pip:
pip install django-login-history2
Add 'login_history' to your INSTALLED_APPS in the Django configuration file (settings.py):
INSTALLED_APPS = [
# ...
'django_login_history2',
# ...
]
Run migrations to create the required database tables:
python manage.py migrate
django-login-history2 is easy to use. It will start automatically recording login history once installed and configured.