rescuers own site
This commit is contained in:
parent
908bff726a
commit
f72425f354
5 changed files with 39 additions and 25 deletions
|
@ -19,5 +19,6 @@ from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("bird/", include("fbf.urls")),
|
path("bird/", include("fbf.urls")),
|
||||||
|
path("rescuer/", include("rescuer.urls")),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>Übersicht aller Vögel in Behandlung</h3>
|
<h3>Übersicht aller Vögel in Behandlung</h3>
|
||||||
<table class="table table-striped table-hover" id="t__bids_all">
|
<table class="table table-striped table-hover" id="t__bids_all">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Vogel</th>
|
<th>Vogel</th>
|
||||||
|
<th>Finder</th>
|
||||||
<th>Fundort</th>
|
<th>Fundort</th>
|
||||||
<th>angelegt am</th>
|
<th>angelegt am</th>
|
||||||
<th>gefunden von</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -17,11 +17,13 @@
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'bird_single' bird.id %}">{{ bird.bird }}</a>
|
<a href="{% url 'bird_single' bird.id %}">{{ bird.bird }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{% url 'rescuer_single' bird.rescuer_id %}">{{ bird.rescuer }}</a>
|
||||||
|
</td>
|
||||||
<td>{{ bird.place }}</td>
|
<td>{{ bird.place }}</td>
|
||||||
<td>{{ bird.created }}</td>
|
<td>{{ bird.created }}</td>
|
||||||
<td>{{ bird.rescuer }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
1
rescuer/templates/rescuer/rescuer_single.html
Normal file
1
rescuer/templates/rescuer/rescuer_single.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<h1>Single rescuer</h1>
|
5
rescuer/urls.py
Normal file
5
rescuer/urls.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
from .views import rescuer_single
|
||||||
|
|
||||||
|
urlpatterns = [path("<id>", rescuer_single, name="rescuer_single")]
|
|
@ -1,3 +1,8 @@
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from .models import Rescuer
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
|
def rescuer_single(request, id):
|
||||||
|
rescuer = Rescuer.objects.get(id=id)
|
||||||
|
context = {"rescuer": rescuer}
|
||||||
|
return render(request, "rescuer/rescuer_single.html", context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue