D
D
demnagel2019-07-09 22:28:07
Django
demnagel, 2019-07-09 22:28:07

Django-allauth how to change url in email confirmation email?

Hi friends. Used the django-allauth package for authorization in a django project.
The project is in a docker container (with the -p 8002:8001 option) on the server. When starting the container on the command line, I execute the command python manage.py runserver 0.0.0.0:8001. In the admin panel, I specify the site domain.
The problem is that django-allauth sends a confirmation email like -

http://127.0.0.1:8002/accounts/confirm-email/MQ:1hjJgA:XFqIW130fMBQ5_blim_KVxYsVXg/.

In the package code, I found that site.domain is used to build the url - but when I output the variable to the console, I get the correct domain of the form - mysite.com. I can’t figure out which variable to override or how to make it get the necessary url of the form -
http://mysite.com/accounts/confirm-email/MQ:1hjJgA:XFqIW130fMBQ5_blim_KVxYsVXg
. Does anyone know how to solve this issue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Guest007, 2019-07-16
@Guest007

The documentation says:
If the documentation does not help, look in the source code for how {{ activate_url }} is formed and where the domain comes from in it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question