Browse Source

Fixed sqlite3 pattern. This fixes #924

pull/911/merge
Armin Ronacher 11 years ago
parent
commit
6f44ca705f
  1. 2
      docs/patterns/sqlite3.rst

2
docs/patterns/sqlite3.rst

@ -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…
Cancel
Save