first view with query

This commit is contained in:
gw3000 2023-06-08 20:48:33 +02:00
parent 1bbb171ac2
commit 217b4c522b
8 changed files with 55 additions and 6 deletions

View file

@ -1,4 +1,5 @@
from django.shortcuts import render, HttpResponse
from .models import FallenBird
def bird_create(request):
@ -6,11 +7,14 @@ def bird_create(request):
def bird_all(request):
birds_all = FallenBird.objects.all()
for bird in birds_all:
print(bird)
return HttpResponse("Show all Birds")
def bird_recover_all(request):
return HttpResponse(f"Show all recovered Birds")
return HttpResponse("Show all recovered Birds")
def bird_single(request, id):