Déplace les gabarits d’email du bda dans un dossier spécifique

This commit is contained in:
Basile Clement 2016-11-08 09:53:54 +01:00 committed by Basile Clement
parent 1f1419c5f1
commit 53a4413492
9 changed files with 9 additions and 9 deletions

View file

@ -111,7 +111,7 @@ class Spectacle(models.Model):
mail_object = "%s - %s - %s" % (self.title, self.date_no_seconds(),
self.location)
for member in members.values():
mail_body = loader.render_to_string('mail-rappel.txt', {
mail_body = loader.render_to_string('bda/mails/rappel.txt', {
'name': member[0],
'nb_attr': member[1],
'show': self})
@ -271,7 +271,7 @@ class SpectacleRevente(models.Model):
mails_to_send = []
mail_object = "%s" % (self.attribution.spectacle)
for participant in inscrits:
mail_body = loader.render_to_string('mail-revente.txt', {
mail_body = loader.render_to_string('bda/mails/revente.txt', {
'user': participant.user,
'spectacle': self.attribution.spectacle,
'revente': self,
@ -295,7 +295,7 @@ class SpectacleRevente(models.Model):
mails_to_send = []
mail_object = "%s" % (self.attribution.spectacle)
for participant in inscrits:
mail_body = loader.render_to_string('mail-shotgun.txt', {
mail_body = loader.render_to_string('bda/mails/shotgun.txt', {
'user': participant.user,
'spectacle': self.attribution.spectacle,
'domain': Site.objects.get_current(),
@ -332,14 +332,14 @@ class SpectacleRevente(models.Model):
}
mails.append(mail.EmailMessage(
mail_subject,
loader.render_to_string('mail-revente-winner.txt', context),
loader.render_to_string('bda/mails/revente-winner.txt', context),
from_email=settings.MAIL_DATA['revente']['FROM'],
to=[winner.user.email],
reply_to=[seller.user.email],
))
mails.append(mail.EmailMessage(
mail_subject,
loader.render_to_string('mail-revente-seller.txt', context),
loader.render_to_string('bda/mails/revente-seller.txt', context),
from_email=settings.MAIL_DATA['revente']['FROM'],
to=[seller.user.email],
reply_to=[winner.user.email],
@ -350,7 +350,7 @@ class SpectacleRevente(models.Model):
if inscrit == winner:
continue
mail_body = loader.render_to_string('mail-revente-loser.txt', {
mail_body = loader.render_to_string('bda/mails/revente-loser.txt', {
'acheteur': inscrit.user,
'vendeur': seller.user,
'spectacle': spectacle,

View file

@ -305,7 +305,7 @@ def revente(request, tirage_id):
revente.seller = participant
revente.date = timezone.now()
mail_subject = "BdA-Revente : {:s}".format(attribution.spectacle.title)
mail_body = loader.render_to_string('mail-revente-new.txt', {
mail_body = loader.render_to_string('bda/mails/revente-new.txt', {
'vendeur': participant.user,
'spectacle': attribution.spectacle,
'revente': revente,
@ -571,11 +571,11 @@ def send_rappel(request, spectacle_id):
# Mails d'exemples
fake_member = request.user
fake_member.nb_attr = 1
exemple_mail_1place = loader.render_to_string('mail-rappel.txt', {
exemple_mail_1place = loader.render_to_string('bda/mails/rappel.txt', {
'member': fake_member,
'show': show})
fake_member.nb_attr = 2
exemple_mail_2places = loader.render_to_string('mail-rappel.txt', {
exemple_mail_2places = loader.render_to_string('bda/mails/rappel.txt', {
'member': fake_member,
'show': show})
# Contexte