forked from DGNum/gestioCOF
Proper use of messages in places
This commit is contained in:
parent
91fff8a11e
commit
efea92b5d2
2 changed files with 6 additions and 6 deletions
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2><strong>Places attribuées</strong></h3>
|
<h2><strong>Places attribuées</strong></h3>
|
||||||
{% if warning %}
|
|
||||||
<h3 class="error">Attention, vous avez reçu plusieurs places pour des spectacles différents à la même date !</h3>
|
|
||||||
{% endif %}
|
|
||||||
{% if places %}
|
{% if places %}
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
{% for place in places %}
|
{% for place in places %}
|
|
@ -112,12 +112,15 @@ def places(request, tirage_id):
|
||||||
warning = True
|
warning = True
|
||||||
else:
|
else:
|
||||||
dates.append(date)
|
dates.append(date)
|
||||||
return render(request, "resume_places.html",
|
# On prévient l'utilisateur s'il a deux places à la même date
|
||||||
|
if warning:
|
||||||
|
messages.warning(request, "Attention, vous avez reçu des places pour "
|
||||||
|
"des spectacles différents à la même date.")
|
||||||
|
return render(request, "bda/resume_places.html",
|
||||||
{"participant": participant,
|
{"participant": participant,
|
||||||
"places": filtered_places,
|
"places": filtered_places,
|
||||||
"tirage": tirage,
|
"tirage": tirage,
|
||||||
"total": total,
|
"total": total})
|
||||||
"warning": warning})
|
|
||||||
|
|
||||||
|
|
||||||
@cof_required
|
@cof_required
|
||||||
|
|
Loading…
Reference in a new issue