From 86cdb9caa48d7a7069978dd127be61169b7c7e95 Mon Sep 17 00:00:00 2001 From: cly Date: Mon, 23 Mar 2020 13:56:38 +0100 Subject: index.py modified --- web/website/.index.py.swp | Bin 0 -> 12288 bytes web/website/index.py | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 web/website/.index.py.swp diff --git a/web/website/.index.py.swp b/web/website/.index.py.swp new file mode 100644 index 0000000..56f940f Binary files /dev/null and b/web/website/.index.py.swp differ diff --git a/web/website/index.py b/web/website/index.py index 87392db..499d86f 100644 --- a/web/website/index.py +++ b/web/website/index.py @@ -2,10 +2,27 @@ # -*- coding: utf-8 -*- import mod_python -import fonctions +from fonctions import baseHTML, connexionBD def index(req): req.content_type="text/html" - req.write(fonctions.baseHTML("ATS-Project",""" -

ATS-Project

-""")) + + content=str() + +#sql part + conn=connexionBD() + cur=conn.cursor() + sql="select * from trame;" + cur.execute(sql) + conn.commit() + data=cur.fetchall() + conn.close() +#sql part + + for i in data : + content+=("""""") + + req.write(baseHTML("ATS-Project",""" +

ATS-Project

""" ++ content)) + -- cgit v1.2.3