Skip to content
Myr

Merge pull request #1861 from ryanbackman/master

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

Document Runtime Error when running outside of application context

authored by Jeff Widman · committed by Jeff Widman · parents 4102be4, cbdd2aa · Browse files · 1 file+5 added−0 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:docs/appcontext.rst+5 added
72 unmodified lines
73The application context is also used by the :func:`~flask.url_for`74function in case a ``SERVER_NAME`` was configured. This allows you to75generate URLs even in the absence of a request.7677If a request context has not been pushed and an application context has 78not been explicitly set, a ``RuntimeError`` will be raised.79::80 RuntimeError: Working outside of application context.8182Locality of the Context83-----------------------8485The application context is created and destroyed as necessary. It never
53 unmodified lines