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:
parent
4f8374318b
commit
a5fc8c20f2
1 changed files with 17 additions and 10 deletions
|
@ -1,16 +1,23 @@
|
||||||
{% extends "fiches/base.html" %}
|
{% extends "fiches/base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h2> Anniversaires </h2>
|
|
||||||
|
|
||||||
<div>
|
<div class="content" id="content-birthdays">
|
||||||
<ul>
|
<h2>{% trans "Anniversaires" %}</h2>
|
||||||
{% for profile in result %}
|
|
||||||
<li><a href="{% url 'fiche' profile.user.username %}">{{profile.full_name}}
|
<div>
|
||||||
</a> ({{ profile.department.all|join:", " }} {{profile.promotion}}) : {{ profile.birth_date|date:"j F" }} </li>
|
<ul>
|
||||||
{% endfor %}
|
{% for profile in result %}
|
||||||
</ul>
|
<li>
|
||||||
</div>
|
<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 %}
|
{% endblock %}
|
Loading…
Reference in a new issue