This commit is contained in:
2025-03-20 10:25:05 +01:00
commit 45bccf468b
13 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block body %}
<form action="{{ url }}" method="POST">
<input type="number"
step="0.01"
min="1"
max="10000"
placeholder="Ausgaben"
name="{{ select_id_text }}"
id="{{ select_id_text }}">
&nbsp;
<select name="{{ select_id }}" id="{{ select_id }}">
{% for name in data %}
<option value="{{ name }}">{{ name }}</option>
{% endfor %}
</select>
&nbsp;
<button type="submit"> Eingabe </button>
</form>
{% endblock %}

11
templates/base.html Normal file
View File

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

24
templates/index.html Normal file
View File

@@ -0,0 +1,24 @@
{% extends "base.html" %}
{% block body %}
<p>
<h4>Diese Seite zeigt unsere Ausgaben</h4>
Ausgabe hinzufügen <a href="/add_ausgabe">Klick</a> .
</p>
<table border="1" width="50%">
<tr>
<th>Datum</th>
<th>Ausgaben</th>
<th>Beschreibung</th>
</tr>
{% for name in data %}
<tr>
<td>{{ name.get("datum") }}</td>
<td>{{ name.get("ausgabe") }}</td>
<td> {{ name.get("beschreibung") }}</td>
</tr>
{% endfor %}
</table>
<p><br><h5>Gesamt: {{sum_all}}</h5>
<p> Nächste Schritte </p>
{% endblock %}

22
templates/output.html Normal file
View File

@@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block body %}
<p>
Ausgabe = {{ csv_value_text }} <br> Beschreibung = {{csv_value_disc}}
<br>
</p>
<table>
<tr>
<th>Ausgaben</th>
<th>Beschreibung</th>
</tr>
{% for name in data %}
<tr>
<td>{{ name.get("ausgabe") }}</td>
<td> {{ name.get("beschreibung") }}</td>
</tr>
{% endfor %}
</table>
<p><br><h5>Gesamt: {{sum_all}}</h5>
{% endblock %}