aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcly <clyhtsuriva@gmail.com>2020-03-23 13:56:38 +0100
committercly <clyhtsuriva@gmail.com>2020-03-23 13:56:38 +0100
commit86cdb9caa48d7a7069978dd127be61169b7c7e95 (patch)
tree960d00c0b5c2e6f26058a9c7f7a8b2e0369d36b0
parentb1bf83a625912950055d56a33a97382a6c7d1b27 (diff)
index.py modified
-rw-r--r--web/website/.index.py.swpbin0 -> 12288 bytes
-rw-r--r--web/website/index.py25
2 files changed, 21 insertions, 4 deletions
diff --git a/web/website/.index.py.swp b/web/website/.index.py.swp
new file mode 100644
index 0000000..56f940f
--- /dev/null
+++ b/web/website/.index.py.swp
Binary files 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","""
-<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))
+