def get_db():
    'Opens a new database connection if there is none yet for the\n    current application context.\n    '
    if (not hasattr(g, 'db')):
        g.db = DatabaseConnection(os.getenv('TOBY_DB_USER', 'toby'), os.environ['TOBY_DB_PASSWORD'])
    return g.db
Opens a new database connection if there is none yet for the
current application context.
def get_db():
    'Opens a new database connection if there is none yet for the\n    current application context.\n    '
    if (not hasattr(g, 'db')):
        g.db = DatabaseConnection(os.getenv('TOBY_DB_USER', 'toby'), os.environ['TOBY_DB_PASSWORD'])
    return g.db