From 126f0be550539ba2dda2bb8ae508bd9e67f0973d Mon Sep 17 00:00:00 2001 From: cly Date: Sun, 22 Mar 2020 13:09:02 +0100 Subject: howto psql --- web/website/fonctions.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/website') diff --git a/web/website/fonctions.py b/web/website/fonctions.py index c968351..c1566af 100644 --- a/web/website/fonctions.py +++ b/web/website/fonctions.py @@ -1,5 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +import psycopg2 def baseHTML(title,body): content=(""" @@ -14,3 +15,9 @@ def baseHTML(title,body): """) return content + + +def connexionBD(): + connexion=psycopg2.connect ("host='localhost' dbname='atsdb' user='atsuser' password='123456'") + return connexion + -- cgit v1.2.3