Page des anniversaires, il faudra implémenter une méthode age pour obtenir l'age d'un profil à son prochain anniversaire

This commit is contained in:
Tom Hubrecht 2020-09-16 01:27:24 +02:00
parent 4f8374318b
commit a5fc8c20f2

View file

@ -1,16 +1,23 @@
{% extends "fiches/base.html" %}
{% load i18n %}
{% block content %}
<h2> Anniversaires </h2>
<div class="content" id="content-birthdays">
<h2>{% trans "Anniversaires" %}</h2>
<div>
<ul>
{% for profile in result %}
<li><a href="{% url 'fiche' profile.user.username %}">{{profile.full_name}}
</a> ({{ profile.department.all|join:", " }} {{profile.promotion}}) : {{ profile.birth_date|date:"j F" }} </li>
<li>
<a href="{% url 'fiche' profile.user.username %}"><span class="name">{{ profile.full_name }}</span></a> : {{ profile.birth_date|date:"j F" }}
<span class="age">({{ profile.age }} {% trans "ans" %})</span>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}