Skip to content
Myr

flaskr correct app name

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent a4869eb · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:examples/flaskr/flaskr/factory.py+2 added-2 removed
15 unmodified lines
16from flaskr.blueprints.flaskr import init_db171819def create_app(config=None):20 app = Flask(__name__)20 app = Flask(__name__.split('.')[0])2122 app.config.update(dict(23 DATABASE=os.path.join(app.root_path, 'flaskr.db'),24 DEBUG=True,
35 unmodified lines
60 @app.teardown_appcontext61 def close_db(error):62 """Closes the database again at the end of the request."""63 if hasattr(g, 'sqlite_db'):64 g.sqlite_db.close()64 g.sqlite_db.close()