forked from DGNum/gestioCOF
success message
This commit is contained in:
parent
fcad789e77
commit
284dc12b7c
|
@ -3,6 +3,9 @@
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Inscriptions pour BdA-Revente</h2>
|
<h2>Inscriptions pour BdA-Revente</h2>
|
||||||
|
{% if success %}
|
||||||
|
<p class="success">Ton inscription a bien été prise en compte !</p>
|
||||||
|
{% endif %}
|
||||||
{% if deja_revente %}
|
{% if deja_revente %}
|
||||||
<p class="success">Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !</p>
|
<p class="success">Des reventes existent déjà pour certains de ces spectacles ; vérifie les places disponibles sans tirage !</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -382,6 +382,7 @@ def list_revente(request, tirage_id):
|
||||||
date__gte=timezone.now())
|
date__gte=timezone.now())
|
||||||
shotgun = []
|
shotgun = []
|
||||||
deja_revente = False
|
deja_revente = False
|
||||||
|
success = False
|
||||||
for spectacle in spectacles:
|
for spectacle in spectacles:
|
||||||
revente_objects = SpectacleRevente.objects.filter(
|
revente_objects = SpectacleRevente.objects.filter(
|
||||||
attribution__spectacle=spectacle,
|
attribution__spectacle=spectacle,
|
||||||
|
@ -410,7 +411,9 @@ def list_revente(request, tirage_id):
|
||||||
deja_revente = True
|
deja_revente = True
|
||||||
else:
|
else:
|
||||||
revente.answered_mail.add(participant)
|
revente.answered_mail.add(participant)
|
||||||
|
revente.save()
|
||||||
break
|
break
|
||||||
|
success = True
|
||||||
else:
|
else:
|
||||||
form = InscriptionReventeForm(
|
form = InscriptionReventeForm(
|
||||||
tirage,
|
tirage,
|
||||||
|
@ -418,7 +421,7 @@ def list_revente(request, tirage_id):
|
||||||
|
|
||||||
return render(request, "liste-reventes.html",
|
return render(request, "liste-reventes.html",
|
||||||
{"form": form, 'shotgun': shotgun,
|
{"form": form, 'shotgun': shotgun,
|
||||||
"deja_revente": deja_revente})
|
"deja_revente": deja_revente, "success": success})
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
|
Loading…
Reference in a new issue