🔧(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:
Anthony LC
2026-01-23 17:56:31 +01:00
parent 1083aac920
commit 325c7d9786
11 changed files with 44 additions and 2 deletions

View File

@@ -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(
{