Source du gabarit : charity/necessiteux_list.html

{% extends 'base.html' %} {% block title %} Nécessiteux {% endblock %} {% block content %} <div class="ui main container"> <p></p> <div class="ui raised segment"> <table id="needy-table" class="ui compact selectable striped celled table" cellspacing="0" width="100%"> <thead> <tr> <th>Code</th> <th>Sexe</th> <th>Age</th> <th>Taille</th> <th>Besoins</th> <th>Association à laquelle il appartient</th> </tr> </thead> <tbody> {% for needy in object_list %} <tr> <td> {{ needy.id }} </td> <td> {% if needy.sexe == 'F' %} Féminin {% else %} Masculin {% endif %} </td> <td> {{ needy.get_age }} </td> <td> {{ needy.taille }} </td> <td> {% if needy.get_need %} {% for need in needy.get_need %} {{ need|safe }}, {% endfor %} {% else %} / {% endif %} </td> <td> {{ needy.association.nom }} </td> </tr> {% empty %} <td>Aucun nécessiteux est ajouté pour le moment</td> <td></td> <td></td> <td></td> <td></td> <td></td> {% endfor %} </tbody> </table> </div> </div> {% endblock %}