diff options
author | clyhtsuriva <clyhtsuriva@gmail.com> | 2020-03-29 19:53:38 +0200 |
---|---|---|
committer | clyhtsuriva <clyhtsuriva@gmail.com> | 2020-03-29 19:53:38 +0200 |
commit | dc539fda0108dc724693fbdd7599bd86980f0de0 (patch) | |
tree | 46765165f34ac356cf0ec1aafeef29f9e8a77c66 /www/html/fonctions.py | |
parent | 8e56aac1e0af4c724f2e6d26746217e1f1812909 (diff) |
some web changes
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 + |