Commit 795ad74c authored by mouadh's avatar mouadh

change connection settings

parent f26b5713
import psycopg2 as pg
# postgres connection
USERNAME = 'postgres'
PASSWORD = 'root'
HOST = 'localhost'
class MyDB(object):
"""Connect to sql database (postgres only right now)."""
def __init__(self,
username='postgres',
password='root',
username=USERNAME,
password=PASSWORD,
db=None,
host='localhost'):
host=HOST):
if db is None:
self.connection = pg.connect(
"user={0} password={1}".format(username, password))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment