diff --git a/fbf/templates/fbf/birds_single.html b/fbf/templates/fbf/birds_single.html new file mode 100644 index 0000000..8f9953f --- /dev/null +++ b/fbf/templates/fbf/birds_single.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% load static %} +{% block content %} +
{{ bird.id }}
+form
+änder und löschen
+{% endblock content %} \ No newline at end of file diff --git a/fbf/views.py b/fbf/views.py index 7cf04ad..1636113 100644 --- a/fbf/views.py +++ b/fbf/views.py @@ -8,8 +8,8 @@ def bird_create(request): def bird_all(request): birds = FallenBird.objects.all() - context = {'birds': birds} - return render(request, 'fbf/birds_all.html', context) + context = {"birds": birds} + return render(request, "fbf/birds_all.html", context) def bird_recover_all(request): @@ -17,7 +17,9 @@ def bird_recover_all(request): def bird_single(request, id): - return HttpResponse(f"Show bird with ID {id}") + bird = FallenBird.objects.get(id=id) + context = {"bird": bird} + return render(request, "fbf/birds_single.html", context) def bird_delete(request, id): diff --git a/rescuer/templates/rescuer/rescuer_all.html b/rescuer/templates/rescuer/rescuer_all.html new file mode 100644 index 0000000..ebed1d4 --- /dev/null +++ b/rescuer/templates/rescuer/rescuer_all.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% load static %} +{% block content %} +form
+änder und löschen
+ +{% endblock content %} \ No newline at end of file diff --git a/rescuer/templates/rescuer/rescuer_single.html b/rescuer/templates/rescuer/rescuer_single.html index 5080b78..4dc1d4e 100644 --- a/rescuer/templates/rescuer/rescuer_single.html +++ b/rescuer/templates/rescuer/rescuer_single.html @@ -1 +1,9 @@ -form
+änder und löschen
+ +{% endblock content %} \ No newline at end of file diff --git a/rescuer/urls.py b/rescuer/urls.py index 78386c3..397e15f 100644 --- a/rescuer/urls.py +++ b/rescuer/urls.py @@ -1,5 +1,8 @@ from django.urls import path -from .views import rescuer_single +from .views import rescuer_single, rescuer_all -urlpatterns = [path("