djangodjango-registration

Adding/changing logic in send_email method within django-registration-redux


My site runs multiple domains. Users can register on each of these domains. As a result, I need to make django-registration-redux:

I've been digging into the source code for django-registration-redux and believe that I need to update the send_email method within registration/models.py (https://github.com/macropin/django-registration/blob/master/registration/models.py) with my required changes.

I'm assuming the best way to add this cusomtization is as follows:

Is there an easier or more correct way to build my custom logic into def send_email without making the changes noted above?

Thanks!


Solution

  • Solution is to add a context processor that grabs the company name and website based on the current website, which can be accessed via request, and then reference the context variable within the django-registration email templates :)