diff options
author | ChatChimi <Pichue07@gmail.com> | 2020-04-18 14:23:26 +0200 |
---|---|---|
committer | ChatChimi <Pichue07@gmail.com> | 2020-04-18 14:23:26 +0200 |
commit | dc48cf7cbca435becc481c80214b320e78825eeb (patch) | |
tree | 79642f267de8d8a04655d1ce3670a9acaeffb081 /www/html/fonctions.py | |
parent | 1323e52025bfd6f6e7584295619002a897c8da0c (diff) | |
parent | 4378405eea982cb3a42584d95767b5003675f611 (diff) |
Merge branch 'master' of https://github.com/clyhtsuriva/ATS-Project
Diffstat (limited to 'www/html/fonctions.py')
-rwxr-xr-x | www/html/fonctions.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/www/html/fonctions.py b/www/html/fonctions.py new file mode 100755 index 0000000..c1566af --- /dev/null +++ b/www/html/fonctions.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import psycopg2 + +def baseHTML(title,body): + content=("""<!DOCTYPE html> +<html> + <head> + <title>"""+ title +"""</title> + <meta charset="UTF-8"> + <link rel="stylesheet" type="text/css" href="style.css"> + </head> + <body>"""+ body +"""</body> +</html> + + """) + return content + + +def connexionBD(): + connexion=psycopg2.connect ("host='localhost' dbname='atsdb' user='atsuser' password='123456'") + return connexion + |