with_appcontext
Wraps a callback so that it's guaranteed to be executed with the script's application context.
def with_appcontext(
f: F
) - > F
Wraps a callback so that it's guaranteed to be executed with the script's application context.
Parameters
| Name | Type | Description |
|---|---|---|
| f | F | The callback function or command to be executed within the application context. |
Returns
| Type | Description |
|---|---|
F | The decorated function wrapped with logic to ensure an active application context during execution. |