diff --git a/bda/templates/descriptions.html b/bda/templates/descriptions.html new file mode 100644 index 00000000..a5512e0e --- /dev/null +++ b/bda/templates/descriptions.html @@ -0,0 +1,33 @@ +{% for show in shows %} + + + + + + + + + + + + + + + + + + + {% if slots_description != "" %} + + + + {% endif %} + +
+

{{ show.title }}

+
{{ show.location }}
{{ show.date }}{{ show.slots }} place{{ show.slots|pluralize}} - show.price
+

{{ show.description }}

+
+ {{ show.slots_description }} +
+{% endfor %} diff --git a/bda/urls.py b/bda/urls.py index 8ec8f277..5d2c6d5f 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -32,4 +32,5 @@ urlpatterns = [ views.unpaid, name="bda-unpaid"), url(r'^mails-rappel/(?P\d+)$', views.send_rappel), + url(r'^descriptions/(?P\d+)$', views.descriptions_spectacles), ] diff --git a/bda/views.py b/bda/views.py index 776932e9..f6c1256a 100644 --- a/bda/views.py +++ b/bda/views.py @@ -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})