From 522a5d051f26edfd6f84525e3cd625e266c5a7ef Mon Sep 17 00:00:00 2001 From: Adil Mohak Date: Thu, 12 Sep 2024 12:16:57 +0300 Subject: [PATCH] Fix: student confirmation email --- accounts/views.py | 11 +++++++++-- .../email/new_student_account_confirmation.html | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index 3168d5a..823adda 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -296,7 +296,7 @@ def staff_add_view(request): + last_name + " has been created. An email with account credentials will be sent to " + email - + " within a minute", + + " within a minute.", ) return redirect("lecturer_list") else: @@ -400,11 +400,18 @@ def student_add_view(request): form = StudentAddForm(request.POST) first_name = request.POST.get("first_name") last_name = request.POST.get("last_name") + email = request.POST.get("email") if form.is_valid(): form.save() messages.success( request, - "Account for " + first_name + " " + last_name + " has been created.", + "Account for " + + first_name + + " " + + last_name + + " has been created. An email with account credentials will be sent to " + + email + + " within a minute.", ) return redirect("student_list") else: diff --git a/templates/accounts/email/new_student_account_confirmation.html b/templates/accounts/email/new_student_account_confirmation.html index c04c6db..e75e5c9 100755 --- a/templates/accounts/email/new_student_account_confirmation.html +++ b/templates/accounts/email/new_student_account_confirmation.html @@ -261,7 +261,7 @@

🚀 Confirm your account

Dear {{ user.get_full_name }},

- A new student account with ID of {user.username} has been + A new student account with ID of {{ user.username }} has been created for you.
You're receiving this e-mail because the Dj-LMS admin has given your e-mail address to register an account on djlms.com.