a looke look
This commit is contained in:
parent
e72dcd86c5
commit
e16d6f3436
9 changed files with 43 additions and 7 deletions
8
fbf/templates/fbf/birds_single.html
Normal file
8
fbf/templates/fbf/birds_single.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
{% block content %}
|
||||||
|
<h3>{{ bird.bird }}</h3>
|
||||||
|
<p>{{ bird.id }}</p>
|
||||||
|
<p> form </p>
|
||||||
|
<p>änder und löschen</p>
|
||||||
|
{% endblock content %}
|
|
@ -8,8 +8,8 @@ def bird_create(request):
|
||||||
|
|
||||||
def bird_all(request):
|
def bird_all(request):
|
||||||
birds = FallenBird.objects.all()
|
birds = FallenBird.objects.all()
|
||||||
context = {'birds': birds}
|
context = {"birds": birds}
|
||||||
return render(request, 'fbf/birds_all.html', context)
|
return render(request, "fbf/birds_all.html", context)
|
||||||
|
|
||||||
|
|
||||||
def bird_recover_all(request):
|
def bird_recover_all(request):
|
||||||
|
@ -17,7 +17,9 @@ def bird_recover_all(request):
|
||||||
|
|
||||||
|
|
||||||
def bird_single(request, id):
|
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):
|
def bird_delete(request, id):
|
||||||
|
|
9
rescuer/templates/rescuer/rescuer_all.html
Normal file
9
rescuer/templates/rescuer/rescuer_all.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
{% block content %}
|
||||||
|
<h3>Übersicht aller Finder</h3>
|
||||||
|
|
||||||
|
<p> form </p>
|
||||||
|
<p>änder und löschen</p>
|
||||||
|
|
||||||
|
{% endblock content %}
|
|
@ -1 +1,9 @@
|
||||||
<h1>Single rescuer</h1>
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
{% block content %}
|
||||||
|
<h3>{{ rescuer.first_name }} {{ rescuer.last_name }}</h3>
|
||||||
|
|
||||||
|
<p> form </p>
|
||||||
|
<p>änder und löschen</p>
|
||||||
|
|
||||||
|
{% endblock content %}
|
|
@ -1,5 +1,8 @@
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from .views import rescuer_single
|
from .views import rescuer_single, rescuer_all
|
||||||
|
|
||||||
urlpatterns = [path("<id>", rescuer_single, name="rescuer_single")]
|
urlpatterns = [
|
||||||
|
path("all", rescuer_all, name="rescuer_all"),
|
||||||
|
path("<id>", rescuer_single, name="rescuer_single"),
|
||||||
|
]
|
||||||
|
|
|
@ -2,6 +2,12 @@ from django.shortcuts import render
|
||||||
from .models import Rescuer
|
from .models import Rescuer
|
||||||
|
|
||||||
|
|
||||||
|
def rescuer_all(request):
|
||||||
|
rescuer = Rescuer.objects.all()
|
||||||
|
context = {"rescuer": rescuer}
|
||||||
|
return render(request, "rescuer/rescuer_all.html", context)
|
||||||
|
|
||||||
|
|
||||||
def rescuer_single(request, id):
|
def rescuer_single(request, id):
|
||||||
rescuer = Rescuer.objects.get(id=id)
|
rescuer = Rescuer.objects.get(id=id)
|
||||||
context = {"rescuer": rescuer}
|
context = {"rescuer": rescuer}
|
||||||
|
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -9,7 +9,7 @@
|
||||||
<!-- favicon -->
|
<!-- favicon -->
|
||||||
<link rel="shortcut icon" href="{% static 'img/favicon.ico' %}" type="image/x-icon">
|
<link rel="shortcut icon" href="{% static 'img/favicon.ico' %}" type="image/x-icon">
|
||||||
<!-- <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> -->
|
<!-- <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> -->
|
||||||
<link rel="stylesheet" href="https://bootswatch.com/5/spacelab/bootstrap.min.css">
|
<link rel="stylesheet" href="https://bootswatch.com/5/cosmo/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
||||||
<!-- possible dynamic header -->
|
<!-- possible dynamic header -->
|
||||||
<title>
|
<title>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue