django allauth templates for easy overrides

This commit is contained in:
jpt 2025-04-19 19:20:00 -05:00
parent 4364d31a59
commit f2d883d9c6
77 changed files with 1078 additions and 1 deletions

View File

@ -30,6 +30,7 @@ If you are using this library as a baseline, there are a few steps you'll need t
- `static/root/robots.txt` - A default robots.txt is provided that excludes troublesome AI bots. (via https://github.com/ai-robots-txt/ai.robots.txt/blob/main/robots.txt) - `static/root/robots.txt` - A default robots.txt is provided that excludes troublesome AI bots. (via https://github.com/ai-robots-txt/ai.robots.txt/blob/main/robots.txt)
) )
- `templates/` - Django is configured to search this directory for your templates. You can also put templates within `<appdir>/templates/` for any given app, but this layout keeps them all together. - `templates/` - Django is configured to search this directory for your templates. You can also put templates within `<appdir>/templates/` for any given app, but this layout keeps them all together.
- `templates/account/` - For your convinience, the default auth templates provided by `django-allauth`. Replace or modify these.
Additionally, there are two directories that you will see after running your application. These are `.gitignore`d. Additionally, there are two directories that you will see after running your application. These are `.gitignore`d.
@ -113,3 +114,10 @@ Augment's django's built in `auth` with commonly-needed views for signup, email
**You:** Review settings & ensure that they meet your application's login needs. **You:** Review settings & ensure that they meet your application's login needs.
## Pre-Configured URLs
- `/djadmin` - [`django.admin`](https://docs.djangoproject.com/en/5.2/ref/contrib/admin/)
- `/accounts/login`
- `/accounts/signup`
- `/accounts/login/code`
- `/accounts/password/reset`

View File

@ -4,7 +4,7 @@ from django.urls import path, include
from debug_toolbar.toolbar import debug_toolbar_urls from debug_toolbar.toolbar import debug_toolbar_urls
urlpatterns = [ urlpatterns = [
path("admin/", admin.site.urls), path("djadmin/", admin.site.urls),
path("accounts/", include("allauth.urls")), path("accounts/", include("allauth.urls")),
] ]

27
templates/account/README Normal file
View File

@ -0,0 +1,27 @@
These templates from <https://codeberg.org/allauth/django-allauth>
The MIT License (MIT)
Copyright (c) 2010-2021 Raymond Penners and contributors
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,14 @@
{% extends "allauth/layouts/entrance.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% translate "Account Inactive" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% translate "Account Inactive" %}
{% endelement %}
{% element p %}
{% translate "This account is inactive." %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,59 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth account %}
{% block content %}
{% setvar title_ %}
{% block title %}{% endblock %}
{% endsetvar %}
{% setvar action_url %}
{% block action_url %}{% endblock %}
{% endsetvar %}
{% setvar extra_tags %}
{% block extra_tags %}{% endblock %}
{% endsetvar %}
{% setvar form_tags %}
entrance,{{ extra_tags }}
{% endsetvar %}
{% setvar submit_button_tags %}
prominent,confirm,{{ extra_tags }}
{% endsetvar %}
{% setvar recipient %}
{% block recipient %}{% endblock %}
{% endsetvar %}
{% element h1 %}
{{ title_ }}
{% endelement %}
{% element p %}
{% blocktranslate %}We've sent a code to {{ recipient }}. The code expires shortly, so please enter it soon.{% endblocktranslate %}
{% endelement %}
{% element form form=form method="post" action=action_url tags=form_tags %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" tags=submit_button_tags %}
{% translate "Confirm" %}
{% endelement %}
{% if cancel_url %}
{% element button href=cancel_url tags="link,cancel" %}
{% translate "Cancel" %}
{% endelement %}
{% else %}
{% element button type="submit" form="logout-from-stage" tags="link,cancel" %}
{% translate "Cancel" %}
{% endelement %}
{% endif %}
{% endslot %}
{% endelement %}
{% if not cancel_url %}
<form id="logout-from-stage"
method="post"
action="{% url 'account_logout' %}">
<input type="hidden" name="next" value="{% url 'account_login' %}">
{% csrf_token %}
</form>
{% endif %}
{% endblock content %}

View File

@ -0,0 +1 @@
{% extends "allauth/layouts/entrance.html" %}

View File

@ -0,0 +1 @@
{% extends "allauth/layouts/manage.html" %}

View File

@ -0,0 +1 @@
{% extends "account/base_manage.html" %}

View File

@ -0,0 +1 @@
{% extends "account/base_manage.html" %}

View File

@ -0,0 +1 @@
{% extends "account/base_manage.html" %}

View File

@ -0,0 +1,29 @@
{% extends "account/base_entrance.html" %}
{% load allauth %}
{% load i18n %}
{% block head_title %}
{% trans "Confirm Access" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Confirm Access" %}
{% endelement %}
{% element p %}
{% blocktranslate %}Please reauthenticate to safeguard your account.{% endblocktranslate %}
{% endelement %}
{% block reauthenticate_content %}{% endblock %}
{% if reauthentication_alternatives %}
{% element hr %}
{% endelement %}
{% element h2 %}
{% translate "Alternative options" %}
{% endelement %}
{% element button_group %}
{% for alt in reauthentication_alternatives %}
{% element button href=alt.url tags="primary,outline" %}
{{ alt.description }}
{% endelement %}
{% endfor %}
{% endelement %}
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_confirm_code.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% translate "Email Verification" %}
{% endblock head_title %}
{% block title %}
{% translate "Enter Email Verification Code" %}
{% endblock %}
{% block recipient %}<a href="mailto:{{ email }}">{{ email }}</a>{% endblock %}
{% block action_url %}
{% url 'account_email_verification_sent' %}
{% endblock %}
{% block extra_tags %}email,verification{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends "account/base_confirm_code.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% translate "Sign In" %}
{% endblock head_title %}
{% block title %}
{% translate "Enter Sign-In Code" %}
{% endblock %}
{% block recipient %}
{% if email %}
<a href="mailto:{{ email }}">{{ email }}</a>
{% else %}
<a href="tel:{{ phone }}">{{ phone }}</a>
{% endif %}
{% endblock %}
{% block action_url %}
{% url 'account_confirm_login_code' %}
{% endblock %}
{% block extra_tags %}login{% endblock %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_confirm_code.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% translate "Password Reset" %}
{% endblock head_title %}
{% block title %}
{% translate "Enter Password Reset Code" %}
{% endblock %}
{% block recipient %}<a href="mailto:{{ email }}">{{ email }}</a>{% endblock %}
{% block action_url %}
{% url 'account_confirm_password_reset_code' %}
{% endblock %}
{% block extra_tags %}email,verification{% endblock %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_confirm_code.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% translate "Phone Verification" %}
{% endblock head_title %}
{% block title %}
{% translate "Enter Phone Verification Code" %}
{% endblock %}
{% block recipient %}<a href="tel:{{ phone }}">{{ phone }}</a>{% endblock %}
{% block action_url %}
{% url 'account_verify_phone' %}
{% endblock %}
{% block extra_tags %}phone,verification{% endblock %}

View File

@ -0,0 +1,83 @@
{% extends "account/base_manage_email.html" %}
{% load static allauth i18n %}
{% block head_title %}
{% trans "Email Addresses" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Email Addresses" %}
{% endelement %}
{% if emailaddresses %}
{% element p %}
{% trans 'The following email addresses are associated with your account:' %}
{% endelement %}
{% url 'account_email' as email_url %}
{% element form form=form action=email_url method="post" tags="email,list" %}
{% slot body %}
{% csrf_token %}
{% for radio in emailaddress_radios %}
{% with emailaddress=radio.emailaddress %}
{% element field type="radio" checked=radio.checked name="email" value=emailaddress.email id=radio.id %}
{% slot label %}
{{ emailaddress.email }}
{% if emailaddress.verified %}
{% element badge tags="success,email,verified" %}
{% translate "Verified" %}
{% endelement %}
{% else %}
{% element badge tags="warning,email,unverified" %}
{% translate "Unverified" %}
{% endelement %}
{% endif %}
{% if emailaddress.primary %}
{% element badge tags="email,primary" %}
{% translate "Primary" %}
{% endelement %}
{% endif %}
{% endslot %}
{% endelement %}
{% endwith %}
{% endfor %}
{% endslot %}
{% slot actions %}
{% element button type="submit" name="action_primary" %}
{% trans 'Make Primary' %}
{% endelement %}
{% element button tags="secondary" type="submit" name="action_send" %}
{% trans 'Re-send Verification' %}
{% endelement %}
{% element button tags="danger,delete" type="submit" name="action_remove" %}
{% trans 'Remove' %}
{% endelement %}
{% endslot %}
{% endelement %}
{% else %}
{% include "account/snippets/warn_no_email.html" %}
{% endif %}
{% if can_add_email %}
{% element h2 %}
{% trans "Add Email Address" %}
{% endelement %}
{% url 'account_email' as action_url %}
{% element form form=form method="post" action=action_url tags="email,add" %}
{% slot body %}
{% csrf_token %}
{% element fields form=form %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button name="action_add" type="submit" %}
{% trans "Add Email" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endif %}
{% endblock content %}
{% block extra_body %}
<script src="{% static 'account/js/account.js' %}"></script>
<script src="{% static 'account/js/onload.js' %}"></script>
<script data-allauth-onload="allauth.account.forms.manageEmailForm" type="application/json">{
"i18n": {"confirmDelete": "{% trans 'Do you really want to remove the selected email address?' %}"}
}
</script>
{% endblock extra_body %}

View File

@ -0,0 +1,13 @@
{% extends "account/email/base_message.txt" %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktrans %}You are receiving this email because you or someone else tried to signup for an
account using email address:
{{ email }}
However, an account using that email address already exists. In case you have
forgotten about this, please use the password forgotten procedure to recover
your account:
{{ password_reset_url }}{% endblocktrans %}{% endautoescape %}{% endblock content %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Account Already Exists{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,7 @@
{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}
{% block content %}{% endblock content %}
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
{{ site_domain }}{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,14 @@
{% extends "account/email/base_message.txt" %}
{% load account %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktrans %}You are receiving this mail because the following change was made to your account:{% endblocktrans %}
{% block notification_message %}
{% endblock notification_message%}
{% blocktrans %}If you do not recognize this change then please take proper security precautions immediately. The change to your account originates from:
- IP address: {{ip}}
- Browser: {{user_agent}}
- Date: {{timestamp}}{% endblocktrans %}{% endautoescape %}{% endblock %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Your email has been changed from {{ from_email }} to {{ to_email }}.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Email Changed{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Your email has been confirmed.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Email Confirmation{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,9 @@
{% extends "account/email/base_message.txt" %}
{% load account %}
{% load i18n %}
{% block content %}{% autoescape off %}{% user_display user as user_display %}{% blocktranslate with site_name=current_site.name site_domain=current_site.domain %}You're receiving this email because user {{ user_display }} has given your email address to register an account on {{ site_domain }}.{% endblocktranslate %}
{% if code %}{% blocktranslate %}Your email verification code is listed below. Please enter it in your open browser window.{% endblocktranslate %}
{{ code }}{% else %}{% blocktranslate %}To confirm this is correct, go to {{ activate_url }}{% endblocktranslate %}{% endif %}{% endautoescape %}{% endblock content %}

View File

@ -0,0 +1 @@
{% include "account/email/email_confirmation_message.txt" %}

View File

@ -0,0 +1 @@
{% include "account/email/email_confirmation_subject.txt" %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Please Confirm Your Email Address{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Email address {{ deleted_email }} has been removed from your account.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Email Removed{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,9 @@
{% extends "account/email/base_message.txt" %}
{% load account %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktranslate %}Your sign-in code is listed below. Please enter it in your open browser window.{% endblocktranslate %}{% endautoescape %}
{{ code }}
{% blocktranslate %}This mail can be safely ignored if you did not initiate this action.{% endblocktranslate %}{% endblock content %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Sign-In Code{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Your password has been changed.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Changed{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,9 @@
{% extends "account/email/base_message.txt" %}
{% load account %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktranslate %}Your password reset code is listed below. Please enter it in your open browser window.{% endblocktranslate %}{% endautoescape %}
{{ code }}
{% blocktranslate %}This mail can be safely ignored if you did not initiate this action.{% endblocktranslate %}{% endblock content %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset Code{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,9 @@
{% extends "account/email/base_message.txt" %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktrans %}You're receiving this email because you or someone else has requested a password reset for your user account.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}
{{ password_reset_url }}{% if username %}
{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}{% endif %}{% endautoescape %}{% endblock content %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset Email{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Your password has been reset.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,4 @@
{% extends "account/email/base_notification.txt" %}
{% load i18n %}
{% block notification_message %}{% blocktrans %}Your password has been set.{% endblocktrans %}{% endblock notification_message %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Set{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,10 @@
{% extends "account/email/base_message.txt" %}
{% load i18n %}
{% block content %}{% autoescape off %}{% blocktranslate %}You are receiving this email because you, or someone else, tried to access an account with email {{ email }}. However, we do not have any record of such an account in our database.{% endblocktranslate %}
{% blocktranslate %}This mail can be safely ignored if you did not initiate this action.{% endblocktranslate %}
{% blocktranslate %}If it was you, you can sign up for an account using the link below.{% endblocktranslate %}
{{ signup_url }}{% endautoescape %}{% endblock content %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Unknown Account{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,68 @@
{% extends "account/base_manage_email.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Email Address" %}
{% endelement %}
{% if not emailaddresses %}
{% include "account/snippets/warn_no_email.html" %}
{% endif %}
{% url 'account_email' as action_url %}
{% element form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{% if current_emailaddress %}
{% element field id="current_email" disabled=True type="email" value=current_emailaddress.email %}
{% slot label %}
{% translate "Current email" %}:
{% endslot %}
{% endelement %}
{% endif %}
{% if new_emailaddress %}
{% element field id="new_email" value=new_emailaddress.email disabled=True type="email" %}
{% slot label %}
{% if not current_emailaddress %}
{% translate "Current email" %}:
{% else %}
{% translate "Changing to" %}:
{% endif %}
{% endslot %}
{% slot help_text %}
{% blocktranslate %}Your email address is still pending verification.{% endblocktranslate %}
{% element button form="pending-email" type="submit" name="action_send" tags="minor,secondary" %}
{% trans 'Re-send Verification' %}
{% endelement %}
{% if current_emailaddress %}
{% element button form="pending-email" type="submit" name="action_remove" tags="danger,minor" %}
{% trans 'Cancel Change' %}
{% endelement %}
{% endif %}
{% endslot %}
{% endelement %}
{% endif %}
{% element field id=form.email.auto_id name="email" value=form.email.value errors=form.email.errors type="email" %}
{% slot label %}
{% translate "Change to" %}:
{% endslot %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button name="action_add" type="submit" %}
{% trans "Change Email" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% if new_emailaddress %}
<form style="display: none"
id="pending-email"
method="post"
action="{% url 'account_email' %}">
{% csrf_token %}
<input type="hidden" name="email" value="{{ new_emailaddress.email }}">
</form>
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,39 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load account %}
{% load allauth %}
{% block head_title %}
{% trans "Confirm Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Confirm Email Address" %}
{% endelement %}
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
{% if can_confirm %}
{% element p %}
{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an email address for user {{ user_display }}.{% endblocktrans %}
{% endelement %}
{% url 'account_confirm_email' confirmation.key as action_url %}
{% element form method="post" action=action_url %}
{% slot actions %}
{% csrf_token %}
{{ redirect_field }}
{% element button type="submit" %}
{% trans 'Confirm' %}
{% endelement %}
{% endslot %}
{% endelement %}
{% else %}
{% element p %}
{% blocktrans %}Unable to confirm {{ email }} because it is already confirmed by a different account.{% endblocktrans %}
{% endelement %}
{% endif %}
{% else %}
{% url 'account_email' as email_url %}
{% element p %}
{% blocktrans %}This email confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new email confirmation request</a>.{% endblocktrans %}
{% endelement %}
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,61 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% trans "Sign In" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Sign In" %}
{% endelement %}
{% if not SOCIALACCOUNT_ONLY %}
{% setvar link %}
<a href="{{ signup_url }}">
{% endsetvar %}
{% setvar end_link %}
</a>
{% endsetvar %}
{% element p %}
{% blocktranslate %}If you have not created an account yet, then please {{ link }}sign up{{ end_link }} first.{% endblocktranslate %}
{% endelement %}
{% url 'account_login' as login_url %}
{% element form form=form method="post" action=login_url tags="entrance,login" %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" tags="prominent,login" %}
{% trans "Sign In" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endif %}
{% if LOGIN_BY_CODE_ENABLED or PASSKEY_LOGIN_ENABLED %}
{% element hr %}
{% endelement %}
{% element button_group vertical=True %}
{% if PASSKEY_LOGIN_ENABLED %}
{% element button type="submit" form="mfa_login" id="passkey_login" tags="prominent,login,outline,primary" %}
{% trans "Sign in with a passkey" %}
{% endelement %}
{% endif %}
{% if LOGIN_BY_CODE_ENABLED %}
{% element button href=request_login_code_url tags="prominent,login,outline,primary" %}
{% trans "Send me a sign-in code" %}
{% endelement %}
{% endif %}
{% endelement %}
{% endif %}
{% if SOCIALACCOUNT_ENABLED %}
{% include "socialaccount/snippets/login.html" with page_layout="entrance" %}
{% endif %}
{% endblock content %}
{% block extra_body %}
{{ block.super }}
{% if PASSKEY_LOGIN_ENABLED %}
{% include "mfa/webauthn/snippets/login_script.html" with button_id="passkey_login" %}
{% endif %}
{% endblock %}

View File

@ -0,0 +1,25 @@
{% extends "account/base_manage.html" %}
{% load allauth i18n %}
{% block head_title %}
{% trans "Sign Out" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Sign Out" %}
{% endelement %}
{% element p %}
{% trans 'Are you sure you want to sign out?' %}
{% endelement %}
{% url 'account_logout' as action_url %}
{% element form method="post" action=action_url no_visible_fields=True %}
{% slot body %}
{% csrf_token %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" %}
{% trans 'Sign Out' %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You cannot remove your primary email address ({{email}}).{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Unable to confirm {{email}} because it is already confirmed by a different account.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Confirmation email sent to {{email}}.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Removed email address {{email}}.{% endblocktrans %}

View File

@ -0,0 +1,4 @@
{% load account %}
{% load i18n %}
{% user_display user as name %}
{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You have signed out.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}A sign-in code has been sent to {{recipient}}.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Password successfully changed.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Password successfully set.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You have verified phone number {{phone}}.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Primary email address set.{% endblocktrans %}

View File

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Your primary email address must be verified.{% endblocktrans %}

View File

@ -0,0 +1,25 @@
{% extends "account/base_manage_password.html" %}
{% load allauth i18n %}
{% block head_title %}
{% trans "Change Password" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Change Password" %}
{% endelement %}
{% url 'account_change_password' as action_url %}
{% element form form=form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{{ redirect_field }}
{% element fields form=form %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button type="submit" %}
{% trans "Change Password" %}
{% endelement %}
<a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
{% endslot %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,33 @@
{% extends "account/base_entrance.html" %}
{% load i18n allauth account %}
{% block head_title %}
{% trans "Password Reset" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Password Reset" %}
{% endelement %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% element p %}
{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}
{% endelement %}
{% url 'account_reset_password' as reset_url %}
{% element form form=form method="post" action=reset_url %}
{% slot body %}
{% csrf_token %}
{% element fields form=form %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" %}
{% trans 'Reset My Password' %}
{% endelement %}
{% endslot %}
{% endelement %}
{% element p %}
{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,18 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth %}
{% load account %}
{% block head_title %}
{% trans "Password Reset" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Password Reset" %}
{% endelement %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% element p %}
{% blocktrans %}We have sent you an email. If you have not received it please check your spam folder. Otherwise contact us if you do not receive it in a few minutes.{% endblocktrans %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,46 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Change Password" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% if token_fail %}
{% trans "Bad Token" %}
{% else %}
{% trans "Change Password" %}
{% endif %}
{% endelement %}
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
{% element p %}
{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}
{% endelement %}
{% else %}
{% element form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{{ redirect_field }}
{% element fields form=form %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button type="submit" name="action" %}
{% trans 'Change Password' %}
{% endelement %}
{% element button type="submit" form="logout-from-stage" tags="link,cancel" %}
{% translate "Cancel" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endif %}
{% if not cancel_url %}
<form id="logout-from-stage"
method="post"
action="{% url 'account_logout' %}">
<input type="hidden" name="next" value="{% url 'account_login' %}">
{% csrf_token %}
</form>
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Change Password" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Change Password" %}
{% endelement %}
{% element p %}
{% trans 'Your password is now changed.' %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,25 @@
{% extends "account/base_manage_password.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Set Password" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Set Password" %}
{% endelement %}
{% url 'account_set_password' as action_url %}
{% element form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{{ redirect_field }}
{% element fields form=form %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button type="submit" name="action" %}
{% trans 'Set Password' %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,51 @@
{% extends "account/base_manage_phone.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Change Phone" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Change Phone" %}
{% endelement %}
{% url 'account_change_phone' as action_url %}
{% element form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{% if phone %}
{% element field id="current_phone" disabled=True type="tel" value=phone %}
{% slot label %}
{% translate "Current phone" %}:
{% endslot %}
{% if not phone_verified %}
{% slot help_text %}
{% blocktranslate %}Your phone number is still pending verification.{% endblocktranslate %}
{% element button form="verify-phone" type="submit" tags="minor,secondary" %}
{% trans 'Re-send Verification' %}
{% endelement %}
{% endslot %}
{% endif %}
{% endelement %}
{% endif %}
{% element field id=form.phone.auto_id name="phone" value=form.phone.value errors=form.phone.errors type="tel" %}
{% slot label %}
{% translate "Change to" %}:
{% endslot %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button name="action_add" type="submit" %}
{% trans "Change Phone" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% if not phone_verified %}
<form style="display: none"
id="verify-phone"
method="post"
action="{{ action_url }}">
{% csrf_token %}
<input type="hidden" name="action" value="verify">
</form>
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,22 @@
{% extends "account/base_reauthenticate.html" %}
{% load allauth %}
{% load i18n %}
{% block reauthenticate_content %}
{% element p %}
{% blocktranslate %}Enter your password:{% endblocktranslate %}
{% endelement %}
{% url 'account_reauthenticate' as action_url %}
{% element form form=form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" tags="primary,reauthenticate" %}
{% trans "Confirm" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endblock %}

View File

@ -0,0 +1,32 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth account %}
{% block head_title %}
{% translate "Sign In" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% translate "Send me a sign-in code" %}
{% endelement %}
{% element p %}
{% blocktranslate %}You will receive a special code for a password-free sign-in.{% endblocktranslate %}
{% endelement %}
{% url 'account_request_login_code' as login_url %}
{% element form form=form method="post" action=login_url tags="entrance,login" %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button type="submit" tags="prominent,login" %}
{% translate "Request Code" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% url 'account_login' as login_url %}
{% element button href=login_url tags="link" %}
{% translate "Other sign-in options" %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,45 @@
{% extends "account/base_entrance.html" %}
{% load allauth i18n %}
{% block head_title %}
{% trans "Signup" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Sign Up" %}
{% endelement %}
{% setvar link %}
<a href="{{ login_url }}">
{% endsetvar %}
{% setvar end_link %}
</a>
{% endsetvar %}
{% element p %}
{% blocktranslate %}Already have an account? Then please {{ link }}sign in{{ end_link }}.{% endblocktranslate %}
{% endelement %}
{% if not SOCIALACCOUNT_ONLY %}
{% url 'account_signup' as action_url %}
{% element form form=form method="post" action=action_url tags="entrance,signup" %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button tags="prominent,signup" type="submit" %}
{% trans "Sign Up" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endif %}
{% if PASSKEY_SIGNUP_ENABLED %}
{% element hr %}
{% endelement %}
{% element button href=signup_by_passkey_url tags="prominent,signup,outline,primary" %}
{% trans "Sign up using a passkey" %}
{% endelement %}
{% endif %}
{% if SOCIALACCOUNT_ENABLED %}
{% include "socialaccount/snippets/login.html" with page_layout="entrance" %}
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,38 @@
{% extends "account/base_entrance.html" %}
{% load allauth i18n %}
{% block head_title %}
{% trans "Signup" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Passkey Sign Up" %}
{% endelement %}
{% setvar link %}
<a href="{{ login_url }}">
{% endsetvar %}
{% setvar end_link %}
</a>
{% endsetvar %}
{% element p %}
{% blocktranslate %}Already have an account? Then please {{ link }}sign in{{ end_link }}.{% endblocktranslate %}
{% endelement %}
{% url 'account_signup_by_passkey' as action_url %}
{% element form form=form method="post" action=action_url tags="entrance,signup" %}
{% slot body %}
{% csrf_token %}
{% element fields form=form unlabeled=True %}
{% endelement %}
{{ redirect_field }}
{% endslot %}
{% slot actions %}
{% element button tags="prominent,signup" type="submit" %}
{% trans "Sign Up" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% element hr %}
{% endelement %}
{% element button href=signup_url tags="prominent,signup,outline,primary" %}
{% trans "Other options" %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Sign Up Closed" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Sign Up Closed" %}
{% endelement %}
{% element p %}
{% trans "We are sorry, but the sign up is currently closed." %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,9 @@
{% load i18n %}
{% load account %}
{% load allauth %}
{% user_display user as user_display %}
{% element alert %}
{% slot message %}
<strong>{% blocktranslate %}Note{% endblocktranslate %}:</strong> {% blocktranslate %}You are already logged in as {{ user_display }}.{% endblocktranslate %}
{% endslot %}
{% endelement %}

View File

@ -0,0 +1,4 @@
{% load i18n allauth %}
{% element p %}
<strong>{% trans 'Warning:' %}</strong> {% trans "You currently do not have any email address set up. You should really add an email address so you can receive notifications, reset your password, etc." %}
{% endelement %}

View File

@ -0,0 +1,14 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Verify Your Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Verify Your Email Address" %}
{% endelement %}
{% element p %}
{% blocktrans %}We have sent an email to you for verification. Follow the link provided to finalize the signup process. If you do not see the verification email in your main inbox, check your spam folder. Please contact us if you do not receive the verification email within a few minutes.{% endblocktrans %}
{% endelement %}
{% endblock content %}

View File

@ -0,0 +1,25 @@
{% extends "account/base_manage.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Verify Your Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Verify Your Email Address" %}
{% endelement %}
{% url 'account_email' as email_url %}
{% element p %}
{% blocktrans %}This part of the site requires us to verify that
you are who you claim to be. For this purpose, we require that you
verify ownership of your email address. {% endblocktrans %}
{% endelement %}
{% element p %}
{% blocktrans %}We have sent an email to you for
verification. Please click on the link inside that email. If you do not see the verification email in your main inbox, check your spam folder. Otherwise
contact us if you do not receive it within a few minutes.{% endblocktrans %}
{% endelement %}
{% element p %}
{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your email address</a>.{% endblocktrans %}
{% endelement %}
{% endblock content %}