[Answered ]-Password reset in Django-registration can't find site.domain

2👍

django-registration (or rather django.contrib.auth) doesn’t use context processors for rendering emails. You will have to add {{ site }} to the context manually during rendering. Basically you’ll have to customize django-registration‘s urls. Something along those line:

from django.contrib.sites.models import Site
from django.contrib.auth import views as auth_views

....
url(r'^password/reset/$', auth_views.password_reset,
    {'post_reset_redirect': reverse_lazy('auth_password_reset_done'),
     'extra_email_context': {'site': Site.objects.get_current()}},
    name='auth_password_reset'),
....                       
👤lehins

Leave a comment