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 %}
|
||||
<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 %}
|
||||
<table class="table table-striped">
|
||||
{% for place in places %}
|
|
@ -112,12 +112,15 @@ def places(request, tirage_id):
|
|||
warning = True
|
||||
else:
|
||||
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,
|
||||
"places": filtered_places,
|
||||
"tirage": tirage,
|
||||
"total": total,
|
||||
"warning": warning})
|
||||
"total": total})
|
||||
|
||||
|
||||
@cof_required
|
||||
|
|
Loading…
Reference in a new issue