Update comments

This commit is contained in:
Rebecca Hsieh 2025-02-14 09:17:28 -08:00
parent 33bf1988f1
commit 7d8249923e
No known key found for this signature in database

View file

@ -53,11 +53,13 @@ def send_templated_email( # noqa
context = {}
env_base_url = settings.BASE_URL
# The regular expresstion is to get both http (localhost) and https (everything else)
# The regular expression is to get both http (localhost) and https (everything else)
env_name = re.sub(r"^https?://", "", env_base_url).split(".")[0]
# To add to subject lines ie [GETGOV-RH]
# If NOT in prod, add env to the subject line
# IE adds [GETGOV-RH] if we are in the -RH sandbox
prefix = f"[{env_name.upper()}] " if not settings.IS_PRODUCTION else ""
# For email links ie getgov-rh.app.cloud.gov
# If NOT in prod, update instances of "manage.get.gov" links to point to
# current environment, ie "getgov-rh.app.cloud.gov"
manage_url = env_base_url if not settings.IS_PRODUCTION else "https://manage.get.gov"
context["manage_url"] = manage_url