forked from ScoDoc/ScoDoc
comment & function name
This commit is contained in:
parent
5f2021d6c1
commit
b26adbeef1
@ -108,10 +108,13 @@ class Identite(db.Model):
|
|||||||
return r[0] if r else None
|
return r[0] if r else None
|
||||||
|
|
||||||
def inscription_courante_date(self, date_debut, date_fin):
|
def inscription_courante_date(self, date_debut, date_fin):
|
||||||
|
"""La première inscription à un formsemestre incluant la
|
||||||
|
période [date_debut, date_fin]
|
||||||
|
"""
|
||||||
r = [
|
r = [
|
||||||
ins
|
ins
|
||||||
for ins in self.formsemestre_inscriptions
|
for ins in self.formsemestre_inscriptions
|
||||||
if ins.formsemestre.est_courant_date(date_debut, date_fin)
|
if ins.formsemestre.contient_periode(date_debut, date_fin)
|
||||||
]
|
]
|
||||||
return r[0] if r else None
|
return r[0] if r else None
|
||||||
|
|
||||||
|
@ -146,8 +146,9 @@ class FormSemestre(db.Model):
|
|||||||
today = datetime.date.today()
|
today = datetime.date.today()
|
||||||
return (self.date_debut <= today) and (today <= self.date_fin)
|
return (self.date_debut <= today) and (today <= self.date_fin)
|
||||||
|
|
||||||
def est_courant_date(self, date_debut, date_fin) -> bool:
|
def contient_periode(self, date_debut, date_fin) -> bool:
|
||||||
"""Vrai si la date actuelle (now) est dans le semestre
|
"""Vrai si l'intervalle [date_debut, date_fin] est
|
||||||
|
inclus dans le semestre.
|
||||||
(les dates de début et fin sont incluses)
|
(les dates de début et fin sont incluses)
|
||||||
"""
|
"""
|
||||||
return (self.date_debut <= date_debut) and (date_fin <= self.date_fin)
|
return (self.date_debut <= date_debut) and (date_fin <= self.date_fin)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Nom : {{ contact.nom }}<br>
|
Nom : {{ contact.nom }}<br>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Intitulé : {{ offre[0].intitule }}<br>
|
Intitulé : {{ offre[0].intitule }}<br>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
@ -20,9 +21,11 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% for data in historique %}
|
{% for data in historique %}
|
||||||
<li>
|
<li>
|
||||||
<span style="margin-right: 10px;">{{ data[0].date_debut.strftime('%d/%m/%Y') }} - {{ data[0].date_fin.strftime('%d/%m/%Y') }}</span>
|
<span style="margin-right: 10px;">{{ data[0].date_debut.strftime('%d/%m/%Y') }} - {{
|
||||||
|
data[0].date_fin.strftime('%d/%m/%Y') }}</span>
|
||||||
<span style="margin-right: 10px;">
|
<span style="margin-right: 10px;">
|
||||||
{{ data[0].type_offre }} réalisé par {{ data[1].nom|format_nom }} {{ data[1].prenom|format_prenom }} en {{ data[0].formation_text }}
|
{{ data[0].type_offre }} réalisé par {{ data[1].nom|format_nom }} {{ data[1].prenom|format_prenom }} en
|
||||||
|
{{ data[0].formation_text }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -66,7 +69,8 @@
|
|||||||
<a class="btn btn-danger" href="{{ url_for('entreprises.delete_entreprise', id=entreprise.id) }}">Supprimer</a>
|
<a class="btn btn-danger" href="{{ url_for('entreprises.delete_entreprise', id=entreprise.id) }}">Supprimer</a>
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_offre', id=entreprise.id) }}">Ajouter offre</a>
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_offre', id=entreprise.id) }}">Ajouter offre</a>
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_contact', id=entreprise.id) }}">Ajouter contact</a>
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_contact', id=entreprise.id) }}">Ajouter contact</a>
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_historique', id=entreprise.id) }}">Ajouter historique</a>
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_historique', id=entreprise.id) }}">Ajouter
|
||||||
|
historique</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
|
Loading…
Reference in New Issue
Block a user