Search code examples
djangodjango-registrationdjango-context

Django - Extra context in django-registration activation email


I'm using django-registration for a project of mine.

I'd like to add some extra contextual data to the template used for email activation.

Looking into the register view source, I cannot figure out how to do it.

Any idea ?


Solution

  • From what I remember, you need to write your own registration backend object (easier then is sounds) as well as your own profile model that inherits from RegistrationProfile and make the backend use your custom RegistrationProfile instead (This model is where the email templates are rendered and there is no way to extend the context, so they need to be overwritten)