I have a DayArchiveView where I pass in a queryset of booking slots. I would like to be able to pass in some context too, like more data. Specifically, I would like to pass the earliest time, latest time and a few other small calculations.
My view is currently this.
class BookingArchiveView(DayArchiveView):
queryset = BookingSlot.objects.filter(location__club__id=1)
date_field = "start_time"
ordering = ['location']
#I would like to pass in another object like so
context["earliest_time"]=BookingSlot.objects.filter(location__club__id=1).annotate(Min('start_time'))
So I would like to be able to pass in some aggregate functions and calculations that I could render in html. Right now, the HTML only has access to my queryset.