From 644cbda29029ac984dbb4085c0b7321e3a9c08e3 Mon Sep 17 00:00:00 2001 From: Jaenai Rugengande Ihimbazwe Date: Fri, 3 Dec 2021 03:22:46 +0100 Subject: [PATCH 1/5] Changement temp --- templates/bateau.html | 58 ++++++++++++++++----------------------- templates/expedition.html | 15 ++++++++-- templates/sauvees.html | 27 ++++++++++++------ templates/station.html | 15 ++++++++-- 4 files changed, 69 insertions(+), 46 deletions(-) diff --git a/templates/bateau.html b/templates/bateau.html index 3913bc5..1069fbf 100644 --- a/templates/bateau.html +++ b/templates/bateau.html @@ -10,63 +10,53 @@ histoire !--> - {{nom}} + {{nom}} - Sauveuteurs du dunkerquois + +
+ Proposer une modification +

{{nom}}}

+
+

{{HistoireBateau}}

+

- + - + - + - - + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - +
NomNom {{NomBateau}}
ConstructeurConstructeur {{nom}}
DimensionsDimensions {{Dimensions}}
Installation{{Date}}Installation{{Date1}}
Condamnation{{Date}}Condamnation{{Date2}}
OrigineOrigine {{ville}}Nom{{NomBateau}}
Constructeur{{nom}}
Dimensions{{Dimensions}}
Installation{{Date}}
Condamnation{{Date}}
Origine{{ville}}
-

- {{HistoireBateau}} -

+ diff --git a/templates/expedition.html b/templates/expedition.html index 063bb35..c992fc5 100644 --- a/templates/expedition.html +++ b/templates/expedition.html @@ -6,18 +6,29 @@ evenement - {{siecle}} + {{siecle}}- Sauveuteurs du dunkerquois + +
+ Proposer une modification +

{{siecle}}

+
- + diff --git a/templates/sauvees.html b/templates/sauvees.html index 5ed9e51..951a3db 100644 --- a/templates/sauvees.html +++ b/templates/sauvees.html @@ -9,32 +9,43 @@ histoire - {{nom}}{{prenom}} + {{nom}}{{prenom}}- Sauveuteurs du dunkerquois + +
+ Proposer une modification + + + +

{{nom}}}{{prenom}}

+
+

{{histoire}}

+

DateDate {{Annee}}
- + - + - + - +
NomNom {{nom}}
PrenomPrenom {{prenom}}
DateDate {{date}}
PlacePlace {{place}}
-

- {{Histoire}} -

+ \ No newline at end of file diff --git a/templates/station.html b/templates/station.html index 69b773e..5e4f20b 100644 --- a/templates/station.html +++ b/templates/station.html @@ -7,18 +7,29 @@ evenement - {{nom}} + {{nom}} - Sauveuteurs du dunkerquois + +
+ Proposer une modification +

{{nom}}

+
- + From df6933959dc6e079a3a4b9d7ebcb6e99a2389a05 Mon Sep 17 00:00:00 2001 From: Jaenai Rugengande Ihimbazwe Date: Fri, 3 Dec 2021 03:32:10 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Maj=20temp=20bateau,=20exped,=20sauv=C3=A9e?= =?UTF-8?q?s,=20stations.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/bateau.html | 62 +++++++++++++++++++++++++++++++++++++++ templates/expedition.html | 43 +++++++++++++++++++++++++++ templates/sauvees.html | 51 ++++++++++++++++++++++++++++++++ templates/station.html | 44 +++++++++++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 templates/bateau.html create mode 100644 templates/expedition.html create mode 100644 templates/sauvees.html create mode 100644 templates/station.html diff --git a/templates/bateau.html b/templates/bateau.html new file mode 100644 index 0000000..1069fbf --- /dev/null +++ b/templates/bateau.html @@ -0,0 +1,62 @@ + + + + + {{nom}} - Sauveuteurs du dunkerquois + + + + + +
+ Proposer une modification + + + + +

{{nom}}}

+
+

{{HistoireBateau}}

+

+

DateDate {{Annee}}
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Nom{{NomBateau}}
Constructeur{{nom}}
Dimensions{{Dimensions}}
Installation{{Date1}}
Condamnation{{Date2}}
Origine{{ville}}
+ + + + diff --git a/templates/expedition.html b/templates/expedition.html new file mode 100644 index 0000000..c992fc5 --- /dev/null +++ b/templates/expedition.html @@ -0,0 +1,43 @@ + + + + + + {{siecle}}- Sauveuteurs du dunkerquois + + + + +
+ Proposer une modification + +

{{siecle}}

+
+ + + + + + + + + + + +
Date{{Annee}}
{{Evenement}}{{Evenement}}
+ \ No newline at end of file diff --git a/templates/sauvees.html b/templates/sauvees.html new file mode 100644 index 0000000..951a3db --- /dev/null +++ b/templates/sauvees.html @@ -0,0 +1,51 @@ + + + + + + {{nom}}{{prenom}}- Sauveuteurs du dunkerquois + + + + +
+ Proposer une modification + +

{{nom}}}{{prenom}}

+
+

{{histoire}}

+

+ + + + + + + + + + + + + + + + + +
Nom{{nom}}
Prenom{{prenom}}
Date{{date}}
Place{{place}}
+ + + + \ No newline at end of file diff --git a/templates/station.html b/templates/station.html new file mode 100644 index 0000000..5e4f20b --- /dev/null +++ b/templates/station.html @@ -0,0 +1,44 @@ + + + + + + {{nom}} - Sauveuteurs du dunkerquois + + + +

+
+ Proposer une modification + +

{{nom}}

+
+ + + + + + + + + + + +
Date{{Annee}}
{{Evenement}}{{Evenement}}
+ \ No newline at end of file From dfbf62d651f618875f69eedcc46cda91dff16e4e Mon Sep 17 00:00:00 2001 From: Antoine Waehren Date: Fri, 3 Dec 2021 03:49:24 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Finalisation=20de=20la=20page=20des=20r?= =?UTF-8?q?=C3=A9sultats=20de=20recherche.=20M=C3=A0j=20styles=20CSS.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/style.css | 4 ++++ templates/search.html | 23 ------------------- templates/searchresults.html | 38 ++++++++++++++++++++++++-------- templates/searchresults.html.old | 9 ++++++++ 4 files changed, 42 insertions(+), 32 deletions(-) delete mode 100644 templates/search.html create mode 100644 templates/searchresults.html.old diff --git a/static/style.css b/static/style.css index 84f2a2e..75b7dcc 100644 --- a/static/style.css +++ b/static/style.css @@ -45,6 +45,10 @@ table, tr, td { font-size: 30px; } +#searchresults { + width: 75%; +} + .searchbar { float: right; padding-right: 20px; diff --git a/templates/search.html b/templates/search.html deleted file mode 100644 index 3161654..0000000 --- a/templates/search.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - {{nom}} {{prenom}} - Sauveuteurs du dunkerquois - - - - - -
- - - - diff --git a/templates/searchresults.html b/templates/searchresults.html index 178325b..c0650b6 100644 --- a/templates/searchresults.html +++ b/templates/searchresults.html @@ -1,9 +1,29 @@ -
    - - {% for result in liste %} - -
  • {{result.nom}}
  • - - {% endfor %} - -
+ + + + {{nom}} {{prenom}} - Sauveuteurs du dunkerquois + + + + + +
+ +

Résultats de la recherche :

+
+ + {% for result in liste %} + + + + {% endfor %} +
{{result.nom}}
+
+ + diff --git a/templates/searchresults.html.old b/templates/searchresults.html.old new file mode 100644 index 0000000..178325b --- /dev/null +++ b/templates/searchresults.html.old @@ -0,0 +1,9 @@ +
    + + {% for result in liste %} + +
  • {{result.nom}}
  • + + {% endfor %} + +
From cd80455aefe2c0db3943a730edec0a17028f90d2 Mon Sep 17 00:00:00 2001 From: Antoine Waehren Date: Fri, 3 Dec 2021 03:51:37 +0100 Subject: [PATCH 4/5] Suppression du fichier searchresults de test. --- templates/searchresults.html.old | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 templates/searchresults.html.old diff --git a/templates/searchresults.html.old b/templates/searchresults.html.old deleted file mode 100644 index 178325b..0000000 --- a/templates/searchresults.html.old +++ /dev/null @@ -1,9 +0,0 @@ -
    - - {% for result in liste %} - -
  • {{result.nom}}
  • - - {% endfor %} - -
From 55279f99e182615f089766bc12e39c43a75a4bbe Mon Sep 17 00:00:00 2001 From: thunder down Date: Fri, 3 Dec 2021 03:52:32 +0100 Subject: [PATCH 5/5] ajout expedition --- app.py | 5 +++++ pages.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) 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()