Update appfactories.rst, make extension related section clearer #884

Merged
merged 1 commit into from Feb 9, 2014

Projects

None yet

4 participants

@rsyring
rsyring commented Oct 11, 2013

No description provided.

@untitaker
Member

Looks good to me... i don't have commit rights though, you'll have to wait.

@DasIch
Collaborator
DasIch commented Oct 22, 2013

Using Flask-SQLAlchemy <http://pythonhosted.org/Flask-SQLAlchemy/>_, as an example, you should not do[...]

This is a way too strong a statement. You shouldn't do this if it leads to circular imports, apart from that it's fine to do, especially in small applications. .init_app() is merely a convenient way to bind extensions at a later point for modularization.

@rsyring
rsyring commented Oct 22, 2013

you are probably right. how about "as an example, the snippet just below results in less modular code:: A more modular example would be to to put the following in model.py (or equivalent)::"

@mitsuhiko mitsuhiko merged commit 47a41b6 into pallets:master Feb 9, 2014

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment