Merge branch 'Elarnon/do_resell' into 'master'

Supprime do_resell

La fonction utilitaire `bda.views.do_resell` n’est plus utilisée
depuis la nouvelle version de bda-revente.

See merge request !111
This commit is contained in:
Martin Pepin 2016-11-13 12:43:59 +01:00
commit 2a4af5fcf4

View file

@ -263,25 +263,6 @@ def tirage(request, tirage_id):
return render(request, "bda-token.html", {"form": form})
def do_resell(request, form):
spectacle = form.cleaned_data["spectacle"]
count = form.cleaned_data["count"]
places = "2 places" if count == "2" else "une place"
mail = """Bonjour,
Je souhaite revendre %s pour %s le %s (%s) à %.02f.
Contactez moi par email si vous êtes intéressé·e·s !
%s (%s)""" % (places, spectacle.title, spectacle.date_no_seconds(),
spectacle.location, spectacle.price,
request.user.get_full_name(), request.user.email)
send_mail("%s" % spectacle, mail,
request.user.email, ["bda-revente@lists.ens.fr"],
fail_silently=False)
return render(request, "bda-success.html",
{"show": spectacle, "places": places})
@login_required
def revente(request, tirage_id):
tirage = get_object_or_404(Tirage, id=tirage_id)