@transaction_task
def send_first_edit_email(revision_pk):
 revision = Revision.objects.get(pk=revision_pk)
 (user, doc) = (revision.creator, revision.document)
 subject = (u'[MDN] [%(loc)s] %(user)s made their first edit, to: %(doc)s' % {'loc': doc.locale, 'user': user.username, 'doc': doc.title})
 message = render_to_string('wiki/email/edited.ltxt', context_dict(revision))
 doc_url = absolutify(doc.get_absolute_url())
 email = EmailMessage(subject, message, settings.DEFAULT_FROM_EMAIL, to=[config.EMAIL_LIST_SPAM_WATCH], headers={'X-Kuma-Document-Url': doc_url, 'X-Kuma-Editor-Username': user.username})
 email.send()

@ transaction_task def send_first_edit_email ( revision_pk ) : revision = Revision . objects . get ( pk = revision_pk ) ( user , doc ) = ( revision . creator , revision . document ) subject = ( u'[MDN] [%(loc)s] %(user)s made their first edit, to: %(doc)s' % { 'loc' : doc . locale , 'user' : user . username , 'doc' : doc . title } ) message = render_to_string ( 'wiki/email/edited.ltxt' , context_dict ( revision ) ) doc_url = absolutify ( doc . get_absolute_url ( ) ) email = EmailMessage ( subject , message , settings . DEFAULT_FROM_EMAIL , to = [ config . EMAIL_LIST_SPAM_WATCH ] , headers = { 'X-Kuma-Document-Url' : doc_url , 'X-Kuma-Editor-Username' : user . username } ) email . send ( )
make an edited notification email for first-time editors .