mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
send_email: Use STATIC_URL as base for images in emails.
This commit is contained in:
committed by
Alex Vandiver
parent
e31767dda4
commit
72ac38eff8
@@ -113,10 +113,14 @@ def build_email(
|
||||
# except having just a domain instead of an email address.
|
||||
extra_headers["List-Id"] = formataddr((realm.name, realm.host))
|
||||
|
||||
assert settings.STATIC_URL is not None
|
||||
context = {
|
||||
**context,
|
||||
"support_email": FromAddress.SUPPORT,
|
||||
"email_images_base_uri": settings.ROOT_DOMAIN_URI + "/static/images/emails",
|
||||
# Emails use unhashed image URLs so that those continue to
|
||||
# work over time, even if the prod-static directory is cleaned
|
||||
# out; as such, they just use a STATIC_URL prefix.
|
||||
"email_images_base_uri": settings.STATIC_URL + "images/emails",
|
||||
"physical_address": settings.PHYSICAL_ADDRESS,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user