From 1ea04e98e8a3a278e956180a3eadcc51ba016323 Mon Sep 17 00:00:00 2001 From: moanos Date: Sat, 12 Jul 2025 11:46:47 +0200 Subject: [PATCH] fix: fucking wired bug where the url is not displayed in plaintext that how an e-mail looked before: Moin, es wurde ein neuer Useraccount erstellt. [admin] sgsfg (2025-07-12 09:44:27.251212+00:00) Related: http://localhost:8000/user/9/ User anzeigen: --- --- src/fellchensammlung/mail.py | 2 ++ .../fellchensammlung/mail/notifications/new-user.txt | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fellchensammlung/mail.py b/src/fellchensammlung/mail.py index e80c1d6..a9a8923 100644 --- a/src/fellchensammlung/mail.py +++ b/src/fellchensammlung/mail.py @@ -44,6 +44,8 @@ def send_notification_email(notification_pk): plain_message = render_to_string('fellchensammlung/mail/notifications/report.txt', context) elif notification.notification_type == NotificationTypeChoices.NEW_USER: html_message = render_to_string('fellchensammlung/mail/notifications/new-user.html', context) + new_user_url = notification.user_related.get_full_url() + context["new_user_url"] = new_user_url plain_message = render_to_string('fellchensammlung/mail/notifications/new-user.txt', context) elif notification.notification_type == NotificationTypeChoices.AN_IS_TO_BE_CHECKED: html_message = render_to_string('fellchensammlung/mail/notifications/an-to-be-checked.html', context) diff --git a/src/fellchensammlung/templates/fellchensammlung/mail/notifications/new-user.txt b/src/fellchensammlung/templates/fellchensammlung/mail/notifications/new-user.txt index 616cb79..f9a8ef4 100644 --- a/src/fellchensammlung/templates/fellchensammlung/mail/notifications/new-user.txt +++ b/src/fellchensammlung/templates/fellchensammlung/mail/notifications/new-user.txt @@ -4,9 +4,5 @@ es wurde ein neuer Useraccount erstellt. -{{ notification }} -Related: {{ notification.user_related }} -{{ notification.user_related.get_full_url }} - -User anzeigen: {{ notification.user_related.get_full_url }} +User anzeigen: {{ new_user_url }} {% endblocktranslate %}{% endblock %} \ No newline at end of file