Works like :func:`has_request_context` but for the application context. You can also just do a boolean check on the :data:`current_app` object instead. .. versionadded:: 0.9
()
| 226 | |
| 227 | |
| 228 | def has_app_context() -> bool: |
| 229 | """Works like :func:`has_request_context` but for the application |
| 230 | context. You can also just do a boolean check on the |
| 231 | :data:`current_app` object instead. |
| 232 | |
| 233 | .. versionadded:: 0.9 |
| 234 | """ |
| 235 | return _cv_app.get(None) is not None |
| 236 | |
| 237 | |
| 238 | class AppContext: |