Using Master Template

This commit is contained in:
Michael Bergbauer 2025-05-13 07:40:15 +02:00
parent b3c2bad3c2
commit e73d020155
3 changed files with 26 additions and 13 deletions

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
{% extends "master.html" %}
<body>
{% block title %}
Details zu {{ mymember.firstname }} {{ mymember.lastname }}
{% endblock %}
{% block content %}
<h1>{{ mymember.vorname }} {{ mymember.nachname }}</h1>
<p>Geburtsdatum: {{ mymember.geburtsdatum }}</p>
<p>Back to <a href="/members">Members</a></p>
</body>
</html>
{% endblock %}

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>

View File

@ -1,9 +1,11 @@
<!DOCTYPE html>
<html>
<body>
{% extends "master.html" %}
<h1>Members</h1>
{% block title %}
List of all persons
{% endblock %}
{% block content %}
<h1>Members</h1>
<ul>
{% for x in mymembers %}
<li><a href="details/{{x.id}}"> {{ x.vorname }} {{ x.nachname }}</a></li>
@ -12,5 +14,4 @@
{% endfor %}
</ul>
</body>
</html>
{% endblock %}