From d84ce520426575ed4f133ec616fa41362c077b07 Mon Sep 17 00:00:00 2001 From: Thomas Kafetzis Date: Sun, 2 Feb 2025 13:12:16 +0200 Subject: [PATCH] Update email templates (#48) --- .../templates/email_templates/2fa_verification.html | 9 --------- .../delete_account_notification.html | 13 +------------ .../email_templates/new_user_registration.html | 1 - .../update_account_notification.html | 13 +------------ .../email_templates/update_master_password.html | 13 +------------ users/utils.py | 5 +---- 6 files changed, 4 insertions(+), 50 deletions(-) diff --git a/users/templates/email_templates/2fa_verification.html b/users/templates/email_templates/2fa_verification.html index 85c6b2b..8403fcb 100644 --- a/users/templates/email_templates/2fa_verification.html +++ b/users/templates/email_templates/2fa_verification.html @@ -5,7 +5,6 @@ Security Notification: 2FA Verification -

Security Notification: 2FA Verification

Email: {{ user_email }}

OTP Secret Key: {{ secret_key }}

QR Code @@ -44,13 +43,5 @@

Security Notification: 2FA Verification

  • Submit the generated key in the form
  • -

    Date of registration: {{ date_joined }}

    - - -- - -

    - Best Regards,
    - KafetzisThomas -

    diff --git a/users/templates/email_templates/delete_account_notification.html b/users/templates/email_templates/delete_account_notification.html index a571b33..3021359 100644 --- a/users/templates/email_templates/delete_account_notification.html +++ b/users/templates/email_templates/delete_account_notification.html @@ -5,17 +5,6 @@ Security Notification: Your Account Has Been Deleted -

    Security Notification: Your Account Has Been Deleted

    -

    Dear {{ user_name }},

    -

    We are writing to inform you that we have received and processed your request to delete your account associated with the email address {{ user_email }}.

    -

    Your account has now been permanently deleted from our system, and all related data has been removed in accordance with our privacy policy. This action is irreversible, and we will not be able to recover your account or any associated data in the future.

    -

    Thank you for using our service, and we hope to see you again in the future.

    - - -- - -

    - Best Regards,
    - KafetzisThomas -

    +

    The account associated with {{ user_email }} has been deleted.

    diff --git a/users/templates/email_templates/new_user_registration.html b/users/templates/email_templates/new_user_registration.html index 2e48be2..6ee5c98 100644 --- a/users/templates/email_templates/new_user_registration.html +++ b/users/templates/email_templates/new_user_registration.html @@ -5,7 +5,6 @@ Admin Notification: New User Registration -

    Admin Notification: New User Registration

    ID: {{ user_id }}

    Email: {{ user_email }}

    Date of registration: {{ date_joined }}

    diff --git a/users/templates/email_templates/update_account_notification.html b/users/templates/email_templates/update_account_notification.html index c4efe8e..a0bc690 100644 --- a/users/templates/email_templates/update_account_notification.html +++ b/users/templates/email_templates/update_account_notification.html @@ -5,17 +5,6 @@ Security Notification: Your Account Settings Have Been Updated -

    Security Notification: Your Account Settings Have Been Updated

    -

    Dear {{ user_name }},

    -

    We are pleased to inform you that your account settings associated with the email address {{ user_email }} have been updated successfully.

    -

    If you did not make this change or if you need assistance, please contact our support team immediately.

    -

    Thank you for keeping your account up to date.

    - - -- - -

    - Best Regards,
    - KafetzisThomas -

    +

    The account settings for {{ user_email }} have been successfully updated.

    diff --git a/users/templates/email_templates/update_master_password.html b/users/templates/email_templates/update_master_password.html index 92fa2cc..13645c7 100644 --- a/users/templates/email_templates/update_master_password.html +++ b/users/templates/email_templates/update_master_password.html @@ -5,17 +5,6 @@ Security Notification: Master Password Updated -

    Security Notification: Master Password Updated

    -

    Dear {{ user_name }},

    -

    We wanted to inform you that your master password has been successfully updated.

    -

    If you did not make this change or if you need assistance, please contact our support team immediately.

    -

    Thank you for keeping your account up to date.

    - - -- - -

    - Best Regards,
    - KafetzisThomas -

    +

    The master password for {{ user_email }} has been successfully updated.

    diff --git a/users/utils.py b/users/utils.py index 2e860df..e8bedb8 100644 --- a/users/utils.py +++ b/users/utils.py @@ -30,7 +30,6 @@ def send_2fa_verification(user, secret_key): { "secret_key": secret_key, "user_email": user.email, - "date_joined": user.date_joined.strftime("%d/%m/%Y %H:%M:%S"), }, ) @@ -46,7 +45,6 @@ def send_delete_account_notification(user): "email_templates/delete_account_notification.html", { "user_email": user.email, - "user_name": user.username, }, ) @@ -65,7 +63,6 @@ def send_update_account_notification(user): "email_templates/update_account_notification.html", { "user_email": user.email, - "user_name": user.username, }, ) @@ -83,7 +80,7 @@ def send_master_password_update(user): html_message = render_to_string( "email_templates/update_master_password.html", { - "user_name": user.username, + "user_email": user.email, }, )