blob: c1566af38a23d4e51c26f5bb5f236d43ac1631d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|