order in view and use a counter in the template

This commit is contained in:
gw3000 2023-08-13 22:02:10 +02:00
parent 8660d1c7ba
commit 473a21cad0
2 changed files with 3 additions and 5 deletions

View file

@ -52,7 +52,7 @@ def bird_help_single(request, id):
def bird_all(request):
birds = FallenBird.objects.filter(Q(status="1") | Q(status="2")).annotate(
total_costs=Sum("costs__costs")
)
).order_by("date_found")
rescuer_modal = Rescuer.objects.all()
context = {"birds": birds, "rescuer_modal": rescuer_modal}
# Post came from the modal form.