Skip to content
Myr

fix has_app_context and has_request_context

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 02a0851 · 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:src/flask/ctx.py+2 added-2 removed
211 unmodified lines
212 self.remote_addr = remote_addr213214 .. versionadded:: 0.7215 """216 return _cv_app.get(None) is not None216 return _cv_request.get(None) is not None217218219def has_app_context() -> bool:220 """Works like :func:`has_request_context` but for the application
1 unmodified line
222 :data:`current_app` object instead.223224 .. versionadded:: 0.9225 """226 return _cv_request.get(None) is not None226 return _cv_app.get(None) is not None227228229class AppContext:230 """The app context contains application-specific information. An app
208 unmodified lines