You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For sending mfa code emails in a multi Site setup. we need to be able to send mails with more context data, like site.name. The current implementation does not pass the request object to the backend which makes it impossible to use the request in rendering the email templates.
Describe the solution you'd like
Pass the request object to the backend. Allow for implementing get_context in subclass. Pass the extra context to the template rendering.
Describe alternatives you've considered
Write a separate backend for each site.
Additional context
None
The text was updated successfully, but these errors were encountered:
Just writing a custom backend is not enough, since the backend needs to know on which site the request came in. If someone is hosting e.g. site aaa.xyz and site bbb.xyz on the same process, how should the email backend know that the request came in on aaa.xyz of bbb.xyz? The only way to do this currently, is to setup two different process with each having it's own settings.
See #158 . This includes a modified email backend, but also some minor changes in trench.backends.base and trench.views.base.
Is your feature request related to a problem? Please describe.
For sending mfa code emails in a multi Site setup. we need to be able to send mails with more context data, like site.name. The current implementation does not pass the request object to the backend which makes it impossible to use the request in rendering the email templates.
Describe the solution you'd like
Pass the request object to the backend. Allow for implementing get_context in subclass. Pass the extra context to the template rendering.
Describe alternatives you've considered
Write a separate backend for each site.
Additional context
None
The text was updated successfully, but these errors were encountered: