From 06ad4b73d54beb6f81d0b43d49f2a0701c87fcfb Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Synck Date: Sun, 1 Mar 2020 14:18:05 +0100 Subject: web update --- web/fonctions.py | 16 ++++++++++++++++ web/index.html | 8 -------- web/test.html | 8 ++++++++ web/test.py | 9 +++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 web/fonctions.py delete mode 100644 web/index.html create mode 100644 web/test.html create mode 100644 web/test.py 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=(""" + + + """+ title +""" + + + + """+ body +""" + + + """) + return content diff --git a/web/index.html b/web/index.html deleted file mode 100644 index b789672..0000000 --- a/web/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - Test - - - This is a test page - diff --git a/web/test.html b/web/test.html new file mode 100644 index 0000000..b789672 --- /dev/null +++ b/web/test.html @@ -0,0 +1,8 @@ + + + + Test + + + This is a test page + 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.")) -- cgit v1.2.3