Ejemplo n.º 1
0
def init():
    # connect to database
    db.init(**POSTGRES)
    db.connect()

    # set up logging
    logging.basicConfig(
        filename=log_file_path,
        level=log_level,
        format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
    )
Ejemplo n.º 2
0
    def __init__(self):
        settings = get_project_settings()

        log.msg("Connecting to database {0}...".format(settings["POSTGRES"]["database"]))
        db.init(**settings["POSTGRES"])
        db.connect()