diff --git a/stages/models.py b/stages/models.py index d0a7810..45bb91b 100644 --- a/stages/models.py +++ b/stages/models.py @@ -18,6 +18,10 @@ class Section(models.Model): def __str__(self): return self.name + def is_fe(self): + """fe=formation en entreprise""" + return self.name in {'ASA', 'ASE', 'ASSC'} + class Level(models.Model): name = models.CharField(max_length=10, verbose_name='Nom') diff --git a/templates/class.html b/templates/class.html index 40583a6..71ad870 100644 --- a/templates/class.html +++ b/templates/class.html @@ -11,18 +11,21 @@ {% block content %}

{{ klass.name }}

Liste des éléves

- + {% if klass.section.is_fe %}{% endif %} {% for student in students %} + {% if klass.section.is_fe %} + {% endif %} {% for train in student.training_set.all %}
Nom, prénomDate naiss.BulletinsRécapitulatif des stages
Nom, prénomDate naiss.BulletinsRécapitulatif des stages
{{ student }} {{ student.birth_date }}{% if student.report_sem1 %}Sem. 1 {% if student.report_sem1_sent %}{% else %} @@ -34,6 +37,7 @@ {% endif %} {% endif %} {{ train.availability.period }}
{{ train.availability.corporation }}
{% if train.comment %}
{% endif %}