def conn_to_db(db_name): conn = sqlite3.connect(app.config['DB_PATH'] + db_name) conn.create_function('LOG', 1, math.log) return conn