I am serving a django app with a reverse proxy via nginx. The app runs locally under localhost:8686 which is mapped to example.com. So the correct link to reset a password would be something like:
https://example.com:8686/accounts/reset/MQ/591-05377c39db92f2d5368a/
but this is what appears in the emails:
https://localhost:8686/accounts/reset/MQ/591-05377c39db92f2d5368a/
Obviously, django (locally served with waitress) does not know about the domain name. Is it possible to tell django which domain name it should be using?