Update homepage template

This commit is contained in:
Edgar P. Burkhart 2022-05-20 15:31:54 +02:00
parent 1f48c41005
commit 83937b4103
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
2 changed files with 20 additions and 5 deletions

View File

@ -1,5 +1,7 @@
{% extends "main/base.html" %}
{%
{% block body %}
<h1>Nummi</h1>
@ -7,11 +9,24 @@
<a href="{% url 'transaction' %}">Add transaction</a>
{% if transactions %}
<ul>
<table id="transactions">
<tr>
<th>Date</th>
<th>Nom</th>
<th>Valeur</th>
<th>Catégorie</th>
<th>Description</th>
</tr>
{% for trans in transactions %}
<li><a href="{% url 'transaction' trans.id %}">{{ trans }}</a></li>
<tr>
<td class="date">{{ trans.date|date:"c" }}</td>
<td class="name"><a href="{% url 'transaction' trans.id %}">{{ trans.name }}</a></td>
<td class="value">{{ trans.value|floatformat:"2g" }} €</td>
<td class="category">{{ trans.category|default_if_none:"" }}</td>
<td class="description">{{ trans.description }}</td>
</tr>
{% endfor %}
</ul>
</table>
{% endif %}
{% if categories %}

View File

@ -106,9 +106,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
LANGUAGE_CODE = "en-us"
LANGUAGE_CODE = "fr-fr"
TIME_ZONE = "UTC"
TIME_ZONE = "CET"
USE_I18N = True