Patient schreibgeschützt #29
This commit is contained in:
parent
af20e9ec16
commit
d779da75e7
2 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,7 @@ import names
|
|||
from django.db.models import Sum
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import HttpResponse, redirect, render
|
||||
from django.db.models import Q
|
||||
from rescuer.models import Rescuer
|
||||
|
||||
from .forms import BirdAddForm, BirdEditForm
|
||||
|
@ -43,7 +44,7 @@ def bird_help(request):
|
|||
|
||||
@login_required(login_url="account_login")
|
||||
def bird_all(request):
|
||||
birds = FallenBird.objects.all().annotate(total_costs=Sum('costs__costs'))
|
||||
birds = FallenBird.objects.filter(Q(status="1")|Q(status="2")).annotate(total_costs=Sum('costs__costs'))
|
||||
rescuer_modal = Rescuer.objects.all()
|
||||
context = {"birds": birds, "rescuer_modal": rescuer_modal}
|
||||
# Post came from the modal form.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue