Skip to content
Myr

Disarmed a sentence a bit

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 135d090 · Browse files · 1 file+1 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+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:docs/patterns/appfactories.rst+1 added-2 removed
59 unmodified lines
60It's preferable to create your extensions and app factories so that the61extension object does not initially get bound to the application.6263Using `Flask-SQLAlchemy <http://pythonhosted.org/Flask-SQLAlchemy/>`_, 64as an example, you should **not** do::64as an example, you should not do something along those lines::65 66 def create_app(config_filename):67 app = Flask(__name__)68 app.config.from_pyfile(config_filename)
12 unmodified lines
8182 from yourapplication.model import db83 db.init_app(app)848585Using this design pattern, no application-specific state is stored on the86extension object, so one extension object can be used for multiple apps. 87For more information about the design of extensions refer to :doc:`/extensiondev`.88
22 unmodified lines