Open jmahicks opened 2 years ago
Have you tried this... It should work for you.
from djoser import email
# Override the default Djoser confirmation email.
class PasswordChangedConfirmationEmail(email.PasswordChangedConfirmationEmail):
template_name = 'email/password_changed_confirmation.html'
Good day,
I have been overwriting the default Djoser email templates with success, but I can't get the "Password Changed Confirmation" email to send.
According to djoser/conf.py, djoser/email.py, and djoser/templates/email it appears I am doing everything correctly. But it's not obvious why this one isn't sending as there are no errors being raised.
The project directory has these relevant files and paths:
settings.py
was set as per the Djoser docs.In email.py I create my custom class to reference the template. The print statements don't even fire so I don't think this is even getting called.
Sending a reset password POST request yields the following (expected) messages in the console:
I then go to the URL it provides and send a POST request with the provided
uid
andtoken
to thereset_password_confirm
end-point and it resolves successfully.I can successfully change the password, but there aren't any print statements from my
PasswordChangedConfirmationEmail
class and no email received.What am I doing wrong here?
Any help would be appreciated, thank you.