I have successfully implemented the regroup call in my template to order missed donations by a pickup_id. The goal was to display all the routes where a a missed donation occured, and a list of all the names underneath the route name. Pickup routes can have the same name so I was grouping by pickup_id. When I do that and call {{ route.grouper }} it returns the ID of the pickup of course. How can I call the field 'route' which displays the route name from grouper?
I was trying things like this...
{{ route.grouper.route }}
{{ route.route.grouper }}
view
missed_routes = Donor.objects.filter(missed='YES').order_by('pickup_id')
template
{% regroup missed_routes by pickup_id as missed_pickups %}
{% for route in missed_pickups %}
<p>{{ route.grouper }}</p>
<ul>
{% for donor in route.list %}
<li>{{ donor.last_name }}</li>
{% endfor %}
</ul>
{% endfor %}