forked from orbit-oss/flask
Fixed sqlite3 pattern. This fixes #924
This commit is contained in:
parent
a8a98bc6b6
commit
6f44ca705f
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ Here is a simple example of how you can use SQLite 3 with Flask::
|
||||||
def get_db():
|
def get_db():
|
||||||
db = getattr(g, '_database', None)
|
db = getattr(g, '_database', None)
|
||||||
if db is None:
|
if db is None:
|
||||||
db = g._database = connect_to_database()
|
db = g._database = sqlite3.connect(DATABASE)
|
||||||
return db
|
return db
|
||||||
|
|
||||||
@app.teardown_appcontext
|
@app.teardown_appcontext
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue