There was an error while loading. Please reload this page.
1 parent ce7386c commit 4278f77Copy full SHA for 4278f77
dash/_get_app.py
@@ -39,6 +39,13 @@ def wrap(*args, **kwargs):
39
40
41
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
49
try:
50
ctx_app = app_context.get()
51
if ctx_app is not None:
0 commit comments