better subjects for content team emails, and add quotes in body

This commit is contained in:
Thomas Steen Rasmussen 2019-07-21 15:26:57 +02:00
parent 1d24878ece
commit d276032389
9 changed files with 38 additions and 42 deletions

View file

@ -12,70 +12,66 @@ def add_new_speakerproposal_email(speakerproposal):
try:
content_team = Team.objects.get(camp=speakerproposal.camp, name="Content")
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
return add_outgoing_email(
text_template="emails/new_speakerproposal.txt",
html_template="emails/new_speakerproposal.html",
to_recipients=content_team.mailing_list,
formatdict=formatdict,
subject="New speaker proposal for {}".format(speakerproposal.camp.title),
subject="New speaker proposal '%s' was just submitted" % speakerproposal.name,
)
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
def add_new_eventproposal_email(eventproposal):
formatdict = {"proposal": eventproposal}
try:
content_team = Team.objects.get(camp=eventproposal.camp, name="Content")
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
return add_outgoing_email(
text_template="emails/new_eventproposal.txt",
html_template="emails/new_eventproposal.html",
to_recipients=content_team.mailing_list,
formatdict=formatdict,
subject="New event proposal for {}".format(eventproposal.camp.title),
subject="New event proposal '%s' was just submitted" % eventproposal.title,
)
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
def add_speakerproposal_updated_email(speakerproposal):
formatdict = {"proposal": speakerproposal}
try:
content_team = Team.objects.get(camp=speakerproposal.camp, name="Content")
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
return add_outgoing_email(
text_template="emails/update_speakerproposal.txt",
html_template="emails/update_speakerproposal.html",
to_recipients=content_team.mailing_list,
formatdict=formatdict,
subject="Updated speaker proposal for {}".format(
speakerproposal.camp.title
),
subject="Speaker proposal '%s' was just updated" % speakerproposal.name,
)
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
def add_eventproposal_updated_email(eventproposal):
formatdict = {"proposal": eventproposal}
try:
content_team = Team.objects.get(camp=eventproposal.camp, name="Content")
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False
return add_outgoing_email(
text_template="emails/update_eventproposal.txt",
html_template="emails/update_eventproposal.html",
to_recipients=content_team.mailing_list,
formatdict=formatdict,
subject="New event proposal for {}".format(eventproposal.camp.title),
subject="Event proposal '%s' was just updated" % eventproposal.title,
)
except ObjectDoesNotExist as e:
logger.info("There is no team with name Content: {}".format(e))
return False

View file

@ -1,6 +1,6 @@
Hello!<br>
<br>
Event {{ proposal.title }} was just submitted as a new proposal for {{ proposal.camp }}.
Event "{{ proposal.title }}" was just submitted as a new proposal for {{ proposal.camp }}.
<br>
<br>
More info <a href="https://bornhack.dk/admin/program/eventproposal/{{ proposal.uuid }}/change/">here</a>.

View file

@ -1,6 +1,6 @@
Hello!
Event {{ proposal.title }} was just submitted as a new proposal for {{ proposal.camp }}.
Event "{{ proposal.title }}" was just submitted as a new proposal for {{ proposal.camp }}.
More info: https://bornhack.dk/admin/program/eventproposal/{{ proposal.uuid }}/change/

View file

@ -1,6 +1,6 @@
Hello!<br>
<br>
Speaker {{ proposal.name }} was just submitted as a new proposal for {{ proposal.camp }}.
Speaker "{{ proposal.name }}" was just submitted as a new proposal for {{ proposal.camp }}.
<br>
<br>
More info <a href="https://bornhack.dk/admin/program/speakerproposal/{{ proposal.uuid }}/change/">here</a>.

View file

@ -1,6 +1,6 @@
Hello!
Speaker {{ proposal.name }} was just submitted as a new proposal for {{ proposal.camp }}.
Speaker "{{ proposal.name }}" was just submitted as a new proposal for {{ proposal.camp }}.
More info: https://bornhack.dk/admin/program/speakerproposal/{{ proposal.uuid }}/change/

View file

@ -1,6 +1,6 @@
Hello!<br>
<br>
Event {{ proposal.name }} for {{ proposal.camp }} was just updated!
Event "{{ proposal.name }}" for {{ proposal.camp }} was just updated!
<br>
<br>
More info <a href="https://bornhack.dk/admin/program/eventproposal/{{ proposal.uuid }}/change/">here</a>.

View file

@ -1,6 +1,6 @@
Hello!
Event {{ proposal.name }} for {{ proposal.camp }} was just updated!
Event "{{ proposal.name }}" for {{ proposal.camp }} was just updated!
More info: https://bornhack.dk/admin/program/eventproposal/{{ proposal.uuid }}/change/

View file

@ -1,6 +1,6 @@
Hello!<br>
<br>
Speaker {{ proposal.name }} for {{ proposal.camp }} was just updated!
Speaker "{{ proposal.name }}" for {{ proposal.camp }} was just updated!
<br>
<br>
More info <a href="https://bornhack.dk/admin/program/speakerproposal/{{ proposal.uuid }}/change/">here</a>.

View file

@ -1,6 +1,6 @@
Hello!
Speaker {{ proposal.name }} was just submitted as a new speaker proposal for {{ proposal.camp }}.
Speaker "{{ proposal.name }}" was just submitted as a new speaker proposal for {{ proposal.camp }}.
More info: https://bornhack.dk/admin/program/speakerproposal/{{ proposal.uuid }}/change/