tickets: List number of booked tickets in the overview.
[matthijs/projects/dorestad-bookings.git] / tickets / views.py
index 4eca48d94739342c8a0e87e5cc33931aa936152d..db988fe448a280ea34d99839741b3c3ff509b133 100644 (file)
@@ -132,8 +132,10 @@ def payments(request):
 def bookings(request):
     shows = {}
     for (show, show_desc) in SHOW_CHOICES:
+        bookings = Booking.objects.filter(show=show)
         shows[show_desc] = {
-            'bookings' : Booking.objects.filter(show=show),
+            'bookings' : bookings,
+            'tickets'  : sum([b.tickets for b in bookings]),
             'payed'    : Booking.objects.filter(show=show, payment__isnull=False),
         }