diff --git a/app.py b/app.py index 794eaf0..12615cb 100644 --- a/app.py +++ b/app.py @@ -26,6 +26,11 @@ def sauveteur(idsauveteur): def bateau(idbateau): return pages.bateau(idbateau) +@app.route('/expeditions/') +@app.route('/expedition/') +def expe(idexpe): + return pages.expeditions(idexpe) + @app.errorhandler(404) def error(e): return pages.error() diff --git a/pages.py b/pages.py index 8e6fad7..3d02f68 100644 --- a/pages.py +++ b/pages.py @@ -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()