With django-rest-framework, when you post a reset password (rest-auth/password/reset/), there is an email send to the user email. This email contains a confirmation URL. I would like to change this url because I'm on a REST app case, I want this email to point on my frontend instead of the django backend.
With the confirmation email case, I had to override get_email_confirmation_url
method from the AccountAdapter
. But with the reset password case, I have no clue how to do it (there is no method in the adapter about reseting password).
Any idea?
I did it with templatetags: https://docs.djangoproject.com/fr/1.10/howto/custom-template-tags/
My templatetags file (e.g.
settings_vars.py
):My variable in my
settings.py
:Usage in my
password_reset_email.html
:If someone know a better solution feel free to comment.
Hope it can helps someone.