From 38d4746f742c364c9f3c459006334ab75d0183fd Mon Sep 17 00:00:00 2001 From: Arthur ZHU Date: Tue, 28 Dec 2021 10:08:09 +0100 Subject: [PATCH] correction --- app/entreprises/routes.py | 2 +- app/templates/entreprises/_offre.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/entreprises/routes.py b/app/entreprises/routes.py index db11ff33f..94af6a758 100644 --- a/app/entreprises/routes.py +++ b/app/entreprises/routes.py @@ -204,7 +204,7 @@ def add_offre(id): file = form.fichier.data filename = secure_filename(file.filename) file.save(os.path.join(path, filename)) - offre.offre_filename = f"{filename}" + offre.filename = f"{filename}" db.session.commit() log = EntrepriseLog( authenticated_user = current_user.user_name, diff --git a/app/templates/entreprises/_offre.html b/app/templates/entreprises/_offre.html index 581ad7afd..07aa4caa1 100644 --- a/app/templates/entreprises/_offre.html +++ b/app/templates/entreprises/_offre.html @@ -5,8 +5,8 @@ Type de l'offre : {{ offre.type_offre }}
Missions : {{ offre.missions }}
Durée : {{ offre.duree }}
- {% if offre.offre_filename %} - Téléchargez le fichier de l'offre + {% if offre.filename %} + {{ offre.filename }} {% endif %}