Skip to content

Commit 4278f77

Browse files
committed
update get_app doc
1 parent ce7386c commit 4278f77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dash/_get_app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ def wrap(*args, **kwargs):
3939

4040

4141
def get_app():
42+
"""
43+
Return the current Dash app instance.
44+
45+
Useful in multi-page apps when Python files within the `pages/` folder
46+
need to reference the `app` object but importing it directly would cause
47+
a circular import error.
48+
"""
4249
try:
4350
ctx_app = app_context.get()
4451
if ctx_app is not None:

0 commit comments

Comments
 (0)