A
A
Anton2017-01-03 16:21:37
Django
Anton, 2017-01-03 16:21:37

Django: How to add the necessary variables to the email template?

There is an example :

Someone asked for password reset for email {{ email }}. Follow the link below:
{{ protocol}}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}

The email arrives with {{ domain }} replaced with an IP:port like 127.0.0.1:8000, while my port is 8080.
How can I embed the value of the desired port into the email template?
Perhaps something needs to be specified in the extra_email_context attribute for password_reset (request...)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
skorpix, 2017-01-12
@Gambetto

It seems to me that this setting is set in the site settings. These settings can be viewed and changed in the admin panel (Sites - sites).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question