Premier jet
Affiche la liste des descriptions des spectacles d'un tirage. Accessible sans authentification.
This commit is contained in:
parent
5d685a04d7
commit
87149d0d4e
3 changed files with 40 additions and 0 deletions
33
bda/templates/descriptions.html
Normal file
33
bda/templates/descriptions.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{% for show in shows %}
|
||||
<table id="spectacle-{{ show.id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<p style="text-align: center;">{{ show.title }}</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ show.location }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ show.date }}</td>
|
||||
<td>{{ show.slots }} place{{ show.slots|pluralize}} - show.price</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p style="text-align: justify;">{{ show.description }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{% if slots_description != "" %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{{ show.slots_description }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
|
@ -32,4 +32,5 @@ urlpatterns = [
|
|||
views.unpaid,
|
||||
name="bda-unpaid"),
|
||||
url(r'^mails-rappel/(?P<spectacle_id>\d+)$', views.send_rappel),
|
||||
url(r'^descriptions/(?P<tirage_id>\d+)$', views.descriptions_spectacles),
|
||||
]
|
||||
|
|
|
@ -364,3 +364,9 @@ def send_rappel(request, spectacle_id):
|
|||
else:
|
||||
ctxt['sent'] = False
|
||||
return render(request, "mails-rappel.html", ctxt)
|
||||
|
||||
|
||||
def descriptions_spectacles(request, tirage_id):
|
||||
tirage = get_object_or_404(Tirage, id=tirage_id)
|
||||
shows = tirage.spectacle_set.all()
|
||||
return render(request, 'descriptions.html', {'shows': shows})
|
||||
|
|
Loading…
Reference in a new issue