diff options
Diffstat (limited to 'web/website')
-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)) + |