Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dash/_get_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ def wrap(*args, **kwargs):


def get_app():
"""
Return the current Dash app instance.
Useful in multi-page apps when Python files within the `pages/` folder
need to reference the `app` object but importing it directly would cause
a circular import error.
"""
try:
ctx_app = app_context.get()
if ctx_app is not None:
Expand Down