Change update_session to template partial
Some checks failed
Django CI/CD / test (push) Failing after 1m3s
Django CI/CD / build-and-push (push) Has been skipped

This commit is contained in:
2024-01-10 14:10:13 +01:00
parent 242833f886
commit aa669710e1
6 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,4 @@
{% load django_htmx %}
<!DOCTYPE html>
<html lang="en">
{% load static %}
@ -12,6 +13,7 @@
{% endblock title %}
</title>
<script src="{% static 'js/htmx.min.js' %}"></script>
{% django_htmx_script %}
<link rel="stylesheet" href="{% static 'base.css' %}" />
</head>
<body class="dark" hx-indicator="#indicator">

View File

@ -30,6 +30,7 @@
</thead>
<tbody>
{% for data in dataset %}
{% partialdef session-row inline=True %}
<tr>
<td class="px-2 sm:px-4 md:px-6 md:py-2 purchase-name truncate max-w-20char md:max-w-40char">
<a class="underline decoration-slate-500 sm:decoration-2"
@ -59,6 +60,7 @@
</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ data.duration_formatted }}</td>
</tr>
{% endpartialdef %}
{% endfor %}
</tbody>
</table>