diff --git a/tjdests/apps/authentication/views.py b/tjdests/apps/authentication/views.py index 26a6ac8..383177e 100644 --- a/tjdests/apps/authentication/views.py +++ b/tjdests/apps/authentication/views.py @@ -65,3 +65,14 @@ def accept_tos_view(request: HttpRequest) -> HttpResponse: context = {"form": form} return render(request, "authentication/accept_tos.html", context=context) + + +def lockout(request, *args, **kwargs): + return HttpResponse( + ( + "Your account has been locked due to too many failed login attempts, ", + f"please contact {settings.MAINTAINER} for assistance ", + "or remember your password next time!", + ), + status=403, + ) diff --git a/tjdests/settings/__init__.py b/tjdests/settings/__init__.py index f5a9e06..cb6b098 100644 --- a/tjdests/settings/__init__.py +++ b/tjdests/settings/__init__.py @@ -124,6 +124,9 @@ AUTHENTICATION_BACKENDS = ( "django.contrib.auth.backends.ModelBackend", ) +AXES_LOCKOUT_CALLABLE = "tjdests.apps.authentication.views.lockout" +MAINTAINER = "" + SOCIAL_AUTH_REDIRECT_IS_HTTPS = False SOCIAL_AUTH_ION_KEY = "" SOCIAL_AUTH_ION_SECRET = "" diff --git a/tjdests/templates/authentication/index.html b/tjdests/templates/authentication/index.html index fa44280..a24ed93 100644 --- a/tjdests/templates/authentication/index.html +++ b/tjdests/templates/authentication/index.html @@ -30,8 +30,9 @@
This website is open source,
- and is © 2021 Ethan Nguyen and contributors.
- All rights reserved.
+ and is currently maintained by {{ settings.MAINTAINER }}
+ © 2021-{% now "Y" %} Ethan Nguyen and contributors.
+ All rights reserved.