From d96f4ead87b933afae496d33822c5d94a30994d7 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Thu, 16 Feb 2017 09:55:19 -0200 Subject: [PATCH] Revert "remove immediate mail" This reverts commit 8953d3de0705a89f13a944f38428d7279143a1b6. --- bda/views.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bda/views.py b/bda/views.py index d82c6e4a..6ec8bbdb 100644 --- a/bda/views.py +++ b/bda/views.py @@ -329,6 +329,7 @@ def revente(request, tirage_id): if 'resell' in request.POST: resellform = ResellForm(participant, request.POST, prefix='resell') if resellform.is_valid(): + datatuple = [] attributions = resellform.cleaned_data["attributions"] with transaction.atomic(): for attribution in attributions: @@ -343,6 +344,18 @@ def revente(request, tirage_id): revente.notif_sent = False revente.tirage_done = False revente.shotgun = False + context = { + 'vendeur': participant.user, + 'show': attribution.spectacle, + 'revente': revente + } + datatuple.append(( + 'bda-revente-new', context, + settings.MAIL_DATA['revente']['FROM'], + [participant.user.email] + )) + revente.save() + send_mass_custom_mail(datatuple) # On annule une revente elif 'annul' in request.POST: annulform = AnnulForm(participant, request.POST, prefix='annul')