{% trans "Members only" %}
+{#{% trans "" %}
#} {% if form.non_field_errors %} {% for error in form.non_field_errors %} @@ -120,9 +47,8 @@{% trans "Become a member" %} -
diff --git a/src/project/settings.py b/src/project/settings.py index e20967a..6ba6764 100644 --- a/src/project/settings.py +++ b/src/project/settings.py @@ -78,9 +78,6 @@ AUTH_PASSWORD_VALIDATORS = [ }, {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, # noqa {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, # noqa - { - "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator" # noqa - }, ] LANGUAGE_CODE = "da-dk" @@ -112,3 +109,10 @@ DEBUG_TOOLBAR_CONFIG = { CURRENCIES = ("DKK",) CURRENCY_CHOICES = [("DKK", "DKK")] + + +# Allauth configuration +ACCOUNT_AUTHENTICATION_METHOD = "email" +ACCOUNT_EMAIL_REQUIRED = True +ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False +ACCOUNT_USERNAME_REQUIRED = False \ No newline at end of file diff --git a/src/project/templates/account/account_inactive.html b/src/project/templates/account/account_inactive.html new file mode 100644 index 0000000..3347f4f --- /dev/null +++ b/src/project/templates/account/account_inactive.html @@ -0,0 +1,11 @@ +{% extends "account/base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Account Inactive" %}{% endblock %} + +{% block content %} +
{% trans "This account is inactive." %}
+{% endblock %} diff --git a/src/project/templates/account/base.html b/src/project/templates/account/base.html new file mode 100644 index 0000000..94d9808 --- /dev/null +++ b/src/project/templates/account/base.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/src/project/templates/account/email.html b/src/project/templates/account/email.html new file mode 100644 index 0000000..602096b --- /dev/null +++ b/src/project/templates/account/email.html @@ -0,0 +1,130 @@ +{% extends 'account/base.html' %} + +{% load i18n %} + +{% block head_title %}{% trans "E-mail Addresses" %}{% endblock %} + + + +{% block content %} + +{% trans 'The following e-mail addresses are associated with your account:' %}
+ + {% else %} ++ {% trans 'Warning:' %} + {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %} +
+ {% endif %} +{% blocktrans with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address for user {{ user_display }}.{% endblocktrans %}
+ + + +{% else %} + +{% url 'account_email' as email_url %} + +{% blocktrans %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request.{% endblocktrans %}
+ +{% endif %} + +{% endblock %} diff --git a/src/project/templates/account/login.html b/src/project/templates/account/login.html index c847778..55f4c82 100644 --- a/src/project/templates/account/login.html +++ b/src/project/templates/account/login.html @@ -1,84 +1,11 @@ +{% extends "account/pre_login_base.html" %} {% load i18n %} {% load static %} - - - - - - -{% trans 'Are you sure you want to sign out?' %}
+ + + + +{% endblock %} diff --git a/src/project/templates/account/messages/cannot_delete_primary_email.txt b/src/project/templates/account/messages/cannot_delete_primary_email.txt new file mode 100644 index 0000000..de55571 --- /dev/null +++ b/src/project/templates/account/messages/cannot_delete_primary_email.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %} diff --git a/src/project/templates/account/messages/email_confirmation_sent.txt b/src/project/templates/account/messages/email_confirmation_sent.txt new file mode 100644 index 0000000..7a526f8 --- /dev/null +++ b/src/project/templates/account/messages/email_confirmation_sent.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Confirmation e-mail sent to {{email}}.{% endblocktrans %} diff --git a/src/project/templates/account/messages/email_confirmed.txt b/src/project/templates/account/messages/email_confirmed.txt new file mode 100644 index 0000000..3427a4d --- /dev/null +++ b/src/project/templates/account/messages/email_confirmed.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %} diff --git a/src/project/templates/account/messages/email_deleted.txt b/src/project/templates/account/messages/email_deleted.txt new file mode 100644 index 0000000..5cf7cf9 --- /dev/null +++ b/src/project/templates/account/messages/email_deleted.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Removed e-mail address {{email}}.{% endblocktrans %} diff --git a/src/project/templates/account/messages/logged_in.txt b/src/project/templates/account/messages/logged_in.txt new file mode 100644 index 0000000..f49248a --- /dev/null +++ b/src/project/templates/account/messages/logged_in.txt @@ -0,0 +1,4 @@ +{% load account %} +{% load i18n %} +{% user_display user as name %} +{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %} diff --git a/src/project/templates/account/messages/logged_out.txt b/src/project/templates/account/messages/logged_out.txt new file mode 100644 index 0000000..2cd4627 --- /dev/null +++ b/src/project/templates/account/messages/logged_out.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}You have signed out.{% endblocktrans %} diff --git a/src/project/templates/account/messages/password_changed.txt b/src/project/templates/account/messages/password_changed.txt new file mode 100644 index 0000000..bd5801c --- /dev/null +++ b/src/project/templates/account/messages/password_changed.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Password successfully changed.{% endblocktrans %} diff --git a/src/project/templates/account/messages/password_set.txt b/src/project/templates/account/messages/password_set.txt new file mode 100644 index 0000000..9d224ee --- /dev/null +++ b/src/project/templates/account/messages/password_set.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Password successfully set.{% endblocktrans %} diff --git a/src/project/templates/account/messages/primary_email_set.txt b/src/project/templates/account/messages/primary_email_set.txt new file mode 100644 index 0000000..b6a70dd --- /dev/null +++ b/src/project/templates/account/messages/primary_email_set.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Primary e-mail address set.{% endblocktrans %} diff --git a/src/project/templates/account/messages/unverified_primary_email.txt b/src/project/templates/account/messages/unverified_primary_email.txt new file mode 100644 index 0000000..9c9d0d8 --- /dev/null +++ b/src/project/templates/account/messages/unverified_primary_email.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}Your primary e-mail address must be verified.{% endblocktrans %} diff --git a/src/project/templates/account/password_change.html b/src/project/templates/account/password_change.html new file mode 100644 index 0000000..108cced --- /dev/null +++ b/src/project/templates/account/password_change.html @@ -0,0 +1,16 @@ +{% extends "account/base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Change Password" %}{% endblock %} + +{% block content %} +{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}
+ + + +{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}
+{% endblock %} diff --git a/src/project/templates/account/password_reset_done.html b/src/project/templates/account/password_reset_done.html new file mode 100644 index 0000000..e90504f --- /dev/null +++ b/src/project/templates/account/password_reset_done.html @@ -0,0 +1,16 @@ +{% extends "account/base.html" %} + +{% load i18n %} +{% load account %} + +{% block head_title %}{% trans "Password Reset" %}{% endblock %} + +{% block content %} +{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}
+{% endblock %} diff --git a/src/project/templates/account/password_reset_from_key.html b/src/project/templates/account/password_reset_from_key.html new file mode 100644 index 0000000..16f27e9 --- /dev/null +++ b/src/project/templates/account/password_reset_from_key.html @@ -0,0 +1,23 @@ +{% extends "account/base.html" %} + +{% load i18n %} +{% block head_title %}{% trans "Change Password" %}{% endblock %} + +{% block content %} +{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktrans %}
+ {% else %} + {% if form %} + + {% else %} +{% trans 'Your password is now changed.' %}
+ {% endif %} + {% endif %} +{% endblock %} diff --git a/src/project/templates/account/password_reset_from_key_done.html b/src/project/templates/account/password_reset_from_key_done.html new file mode 100644 index 0000000..85641c2 --- /dev/null +++ b/src/project/templates/account/password_reset_from_key_done.html @@ -0,0 +1,9 @@ +{% extends "account/base.html" %} + +{% load i18n %} +{% block head_title %}{% trans "Change Password" %}{% endblock %} + +{% block content %} +{% trans 'Your password is now changed.' %}
+{% endblock %} diff --git a/src/project/templates/account/password_set.html b/src/project/templates/account/password_set.html new file mode 100644 index 0000000..f561572 --- /dev/null +++ b/src/project/templates/account/password_set.html @@ -0,0 +1,15 @@ +{% extends "account/base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Set Password" %}{% endblock %} + +{% block content %} +{% trans "We are sorry, but the sign up is currently closed." %}
+{% endblock %} diff --git a/src/project/templates/account/snippets/already_logged_in.html b/src/project/templates/account/snippets/already_logged_in.html new file mode 100644 index 0000000..00799f0 --- /dev/null +++ b/src/project/templates/account/snippets/already_logged_in.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% load account %} + +{% user_display user as user_display %} +{% trans "Note" %}: {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}
diff --git a/src/project/templates/account/verification_sent.html b/src/project/templates/account/verification_sent.html new file mode 100644 index 0000000..5f71331 --- /dev/null +++ b/src/project/templates/account/verification_sent.html @@ -0,0 +1,12 @@ +{% extends "account/base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} + +{% block content %} +{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}
+ +{% endblock %} diff --git a/src/project/templates/account/verified_email_required.html b/src/project/templates/account/verified_email_required.html new file mode 100644 index 0000000..8115c48 --- /dev/null +++ b/src/project/templates/account/verified_email_required.html @@ -0,0 +1,23 @@ +{% extends "account/base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} + +{% block content %} +{% 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 e-mail address. {% endblocktrans %}
+ +{% blocktrans %}We have sent an e-mail to you for +verification. Please click on the link inside this e-mail. Please +contact us if you do not receive it within a few minutes.{% endblocktrans %}
+ +{% blocktrans %}Note: you can still change your e-mail address.{% endblocktrans %}
+ + +{% endblock %} diff --git a/src/project/templates/baseold.html b/src/project/templates/baseold.html deleted file mode 100644 index 23ba8d3..0000000 --- a/src/project/templates/baseold.html +++ /dev/null @@ -1,49 +0,0 @@ -{% load static %} - - - -