1
0
forked from ScoDoc/ScoDoc

correction

This commit is contained in:
Arthur ZHU 2021-12-28 10:08:09 +01:00
parent a7ef5d81c5
commit 38d4746f74
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -5,8 +5,8 @@
Type de l'offre : {{ offre.type_offre }}<br>
Missions : {{ offre.missions }}<br>
Durée : {{ offre.duree }}<br>
{% if offre.offre_filename %}
<a href="{{ url_for('entreprises.download_offre', entreprise_id=entreprise.id, offre_id=offre.id, filename=offre.filename) }}">Téléchargez le fichier de l'offre</a>
{% if offre.filename %}
<a href="{{ url_for('entreprises.download_offre', entreprise_id=entreprise.id, offre_id=offre.id, filename=offre.filename) }}">{{ offre.filename }}</a>
{% endif %}
</p>