mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 17:50:16 -04:00
auth: add maintainer info to index and lockout
settings: move maintainer to __init__
This commit is contained in:
parent
5799abb2bf
commit
3bdb9063ea
|
@ -65,3 +65,14 @@ def accept_tos_view(request: HttpRequest) -> HttpResponse:
|
||||||
context = {"form": form}
|
context = {"form": form}
|
||||||
|
|
||||||
return render(request, "authentication/accept_tos.html", context=context)
|
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 ",
|
||||||
|
"<i>or remember your password next time!</i>",
|
||||||
|
),
|
||||||
|
status=403,
|
||||||
|
)
|
||||||
|
|
|
@ -124,6 +124,9 @@ AUTHENTICATION_BACKENDS = (
|
||||||
"django.contrib.auth.backends.ModelBackend",
|
"django.contrib.auth.backends.ModelBackend",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AXES_LOCKOUT_CALLABLE = "tjdests.apps.authentication.views.lockout"
|
||||||
|
MAINTAINER = ""
|
||||||
|
|
||||||
SOCIAL_AUTH_REDIRECT_IS_HTTPS = False
|
SOCIAL_AUTH_REDIRECT_IS_HTTPS = False
|
||||||
SOCIAL_AUTH_ION_KEY = ""
|
SOCIAL_AUTH_ION_KEY = ""
|
||||||
SOCIAL_AUTH_ION_SECRET = ""
|
SOCIAL_AUTH_ION_SECRET = ""
|
||||||
|
|
|
@ -30,8 +30,9 @@
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This website is <a href="https://github.com/etnguyen03/tjdests" target="_blank">open source</a>,
|
This website is <a href="https://github.com/etnguyen03/tjdests" target="_blank">open source</a>,
|
||||||
and is © 2021 <a href="https://github.com/etnguyen03/tjdests/graphs/contributors" target="_blank">Ethan Nguyen and contributors</a>.
|
and is currently maintained by {{ settings.MAINTAINER }}<br>
|
||||||
All rights reserved.
|
<small>© 2021 <a href="https://github.com/etnguyen03/tjdests/graphs/contributors" target="_blank">Ethan Nguyen and contributors</a>.
|
||||||
|
All rights reserved.</small>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user