ajout expedition

This commit is contained in:
thunder down 2021-12-03 03:52:32 +01:00
parent 0c3fe53ef2
commit 55279f99e1
2 changed files with 17 additions and 0 deletions

5
app.py
View File

@ -26,6 +26,11 @@ def sauveteur(idsauveteur):
def bateau(idbateau):
return pages.bateau(idbateau)
@app.route('/expeditions/<int:idexpe>')
@app.route('/expedition/<int:idexpe>')
def expe(idexpe):
return pages.expeditions(idexpe)
@app.errorhandler(404)
def error(e):
return pages.error()

View File

@ -29,6 +29,18 @@ def bateau(idbateau):
dico["DateInstallation"] = result["date_naissance"]
dico["DateCondamnation"] = result["date_mort"]
return render_template("sauveteur.html",**dico)
else:
return error()
def expeditions(idexpedition):
dico = {}
result = lib.ex_sql(dbname,"SELECT * FROM expedition WHERE expedition_id=?",(idexpedition,))
if len(result) >= 1:
result = result[0]
dico["evenement"] = result["nom"]
dico["Date"] = result["date"]
print("dico")
return render_template("expedition.html",**dico)
else:
return error()