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