cleanup and add email content

This commit is contained in:
Matthew Spence 2024-09-19 16:05:15 -05:00
parent 4ce28fd18b
commit 2f270cded8
No known key found for this signature in database
7 changed files with 29 additions and 5 deletions

View file

@ -39,7 +39,6 @@ class UserFixture:
"username": "be17c826-e200-4999-9389-2ded48c43691",
"first_name": "Matthew",
"last_name": "Spence",
"email": "mspence1845@gmail.com"
},
{
"username": "5f283494-31bd-49b5-b024-a7e7cae00848",
@ -156,7 +155,6 @@ class UserFixture:
"username": "d6bf296b-fac5-47ff-9c12-f88ccc5c1b99",
"first_name": "Matthew-Analyst",
"last_name": "Spence-Analyst",
"email": "mspence1845+1@gmail.com"
},
{
"username": "319c490d-453b-43d9-bc4d-7d6cd8ff6844",

View file

@ -1 +0,0 @@
There has been a change to {{ domain }}

View file

@ -1 +0,0 @@
Change Notification

View file

@ -0,0 +1,23 @@
Hi,
An update was made to a domain you manage.
DOMAIN: {{domain.gov}}
UPDATED BY: {{user}}
UPDATED ON: {{date}}
INFORMATION UPDATED: {{changes}}
You can view this update in the .gov registrar <https://manage.get.gov/>.
Get help with managing your .gov domain <https://get.gov/help/domain-management/>.
----------------------------------------------------------------
WHY DID YOU RECEIVE THIS EMAIL?
Youre listed as a domain manager for $domain.gov, so youll receive a notification whenever changes are made to that domain.
If you have questions or concerns, reach out to the person who made the change or reply to this email.
THANK YOU
.Gov helps the public identify official, trusted information. Thank you for using a .gov domain.
----------------------------------------------------------------
The .gov team
Contact us <https://get.gov/contact/>
Learn about .gov <https://get.gov>

View file

@ -0,0 +1 @@
An update was made to {{domain}}

View file

@ -5,6 +5,7 @@ authorized users can see information on a domain, every view here should
inherit from `DomainPermissionView` (or DomainInvitationPermissionDeleteView).
"""
from datetime import date
import logging
from django.contrib import messages
@ -146,6 +147,9 @@ class DomainFormBaseView(DomainBaseView, FormMixin):
logger.info("Sending email to domain managers")
context={
"domain": self.object,
"user": self.request.user,
"date": date.today(),
"changes": form.changed_data
}
self.email_domain_managers(self.object, "emails/domain_change_notification.txt", "emails/domain_change_notification_subject.txt", context)