Update homepage template
This commit is contained in:
parent
1f48c41005
commit
83937b4103
2 changed files with 20 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
||||||
{% extends "main/base.html" %}
|
{% extends "main/base.html" %}
|
||||||
|
|
||||||
|
{%
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Nummi</h1>
|
<h1>Nummi</h1>
|
||||||
|
|
||||||
|
@ -7,11 +9,24 @@
|
||||||
<a href="{% url 'transaction' %}">Add transaction</a>
|
<a href="{% url 'transaction' %}">Add transaction</a>
|
||||||
|
|
||||||
{% if transactions %}
|
{% 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 %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if categories %}
|
{% if categories %}
|
||||||
|
|
|
@ -106,9 +106,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
# 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
|
USE_I18N = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue