Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
from flask import g
import sqlite3
def connect_to_database():
sql = sqlite3.connect('C:/Users/anuja/PycharmProjects/TourGuideSchedule/guideschedule.db')
sql.row_factory = sqlite3.Row
return sql
def get_database():
if not hasattr(g, 'guideschedule_db'):
g.guideschedule_db = connect_to_database()
return g.guideschedule_db