🔧(project) add DJANGO_EMAIL_URL_APP environment variable
Most of Docs app is configured thanks to environment variables, except the url in the email that was from the django site table. Now we can set it with DJANGO_EMAIL_URL_APP environment variable to have a better consistency. We keep the previous way to avoid breaking changes.
This commit is contained in:
@@ -817,7 +817,7 @@ class Document(MP_Node, BaseModel):
|
||||
def send_email(self, subject, emails, context=None, language=None):
|
||||
"""Generate and send email from a template."""
|
||||
context = context or {}
|
||||
domain = Site.objects.get_current().domain
|
||||
domain = settings.EMAIL_URL_APP or Site.objects.get_current().domain
|
||||
language = language or get_language()
|
||||
context.update(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user