diff options
author | cly <clyhtsuriva@gmail.com> | 2020-03-23 13:56:38 +0100 |
---|---|---|
committer | cly <clyhtsuriva@gmail.com> | 2020-03-23 13:56:38 +0100 |
commit | 86cdb9caa48d7a7069978dd127be61169b7c7e95 (patch) | |
tree | 960d00c0b5c2e6f26058a9c7f7a8b2e0369d36b0 | |
parent | b1bf83a625912950055d56a33a97382a6c7d1b27 (diff) |
index.py modified
-rw-r--r-- | web/website/.index.py.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | web/website/index.py | 25 |
2 files changed, 21 insertions, 4 deletions
diff --git a/web/website/.index.py.swp b/web/website/.index.py.swp Binary files differnew file mode 100644 index 0000000..56f940f --- /dev/null +++ b/web/website/.index.py.swp 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",""" -<center><h1>ATS-Project</h1></center> -""")) + + 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+=("""<ul><li>""" + str(i[1]) + str(i[2]) + str(i[3]) + str(i[4]) + """</li></ul>""") + + req.write(baseHTML("ATS-Project",""" +<center><h1>ATS-Project</h1></center>""" ++ content)) + |