texte_template = Template(template.plain_text)
dict_texte = {"nom_candidat": candidat.nom,
"prenom_candidat": candidat.prenom,
- "offre_emploi": candidat.offre_emploi.nom,}
+ "offre_emploi": candidat.offre_emploi.nom,
+ "genre_candidat": "Monsieur" if candidat.genre == "M" \
+ else "Madame",
+ }
texte = Context(dict_texte)
# HTML text
html_template = Template(template.html)