aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/fonctions.py16
-rw-r--r--web/test.html (renamed from web/index.html)0
-rw-r--r--web/test.py9
3 files changed, 25 insertions, 0 deletions
diff --git a/web/fonctions.py b/web/fonctions.py
new file mode 100644
index 0000000..1b18cc7
--- /dev/null
+++ b/web/fonctions.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+def baseHTML(title,body):
+ content=("""<!DOCTYPE html>
+<html>
+ <head>
+ <title>"""+ title +"""</title>
+ <meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="styde.css">
+ </head>
+ <body>"""+ body +"""</body>
+</html>
+
+ """)
+ return content
diff --git a/web/index.html b/web/test.html
index b789672..b789672 100644
--- a/web/index.html
+++ b/web/test.html
diff --git a/web/test.py b/web/test.py
new file mode 100644
index 0000000..4da1d58
--- /dev/null
+++ b/web/test.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+import mod_python
+import fonctions
+
+def index(req):
+ req.content_type="text/html"
+ req.write(fonctions.baseHTML("Test","This is a test page."))