Skip to content
Myr

More typo fixes

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 f54c4fd · Browse files · 2 files+5 added−4 removed
This commit

State

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

Diff stats

2 files+5 added−4 removed

  • other:+5 added−4 removed

2 files+5 added−4 removed

modified:docs/becomingbig.rst+1 added-1 removed
31 unmodified lines
32 of troubles for applications that have circular dependencies. It33 also requires that the whole application is imported when the system34 initializes or certain URLs will not be available right away. A35 better solution would be to have one module with all URLs in there and36 specifing the target functions explictliy or by name and importing36 specifing the target functions explictly or by name and importing37 them when needed.38- switch to explicit request object passing. This makes it more to type39 (because you now have something to pass around) but it makes it a40 whole lot easier to debug hairy situations and to test the code.
17 unmodified lines
modified:docs/patterns.rst+4 added-3 removed
193 unmodified lines
194-------------------195196Many people prefer `SQLAlchemy`_ for database access. In this case it's197encouraged to use a package instead of a module for your flask application198and drop the modules into a separate module (:ref:`larger-applications`).198and drop the models into a separate module (:ref:`larger-applications`).199Although that is not necessary but makes a lot of sense.200201There are three very common ways to use SQLAlchemy. I will outline each202of them here:
21 unmodified lines
224225 def init_db():226 Base.metadata.create_all(bind=engine)227228To define your models, subclass the `Base` class the above code generated.228To define your models, just subclass the `Base` class that was created by229the code above.230231To use SQLAlchemy in a declarative way with your application, you just231have to put the following code into your application module Flask will232have to put the following code into your application module. Flask will233automatically remove database sessions at the end of the request for you::234235 from yourapplication.database import db_session236
194 unmodified lines