a looke look

This commit is contained in:
gw3000 2023-06-10 16:45:36 +02:00
parent e72dcd86c5
commit e16d6f3436
9 changed files with 43 additions and 7 deletions

View 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 %}

View file

@ -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 %}

View file

@ -1,5 +1,8 @@
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"),
]

View file

@ -2,6 +2,12 @@ from django.shortcuts import render
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):
rescuer = Rescuer.objects.get(id=id)
context = {"rescuer": rescuer}