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 | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'web/website/index.py') 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