In my project I deal with various sorts of events taking places in different cities. I'd like to present list of events per city in a template, but how to do that ? My view now looks like this :
def events_by_state(request, state):
cities = City.objects.filter(state_slug=state)
For each city I'd like do a query :
for c in cities:
events_list = Event.objects.filter(city=c)
But then I have problem in what form and how should I send it, as well as use in my template ??