We just started using Dash for our dashboard requirements. Our plan is that individual teams shall develop their dashboard py file independently and centrally we shall integrate it into single application by calling them from index.py.
Our file structure is as below
- app.py - index.py - apps |-- init.py |-- app1.py |-- app2.py |-- app3.py |-- app4.py |-- app5.py
where app1 to app5 are written independently. index.py shall have the home page content and links to other app1-5.
One issue we face is that, sometimes different developers tend to use same id name in their py files. That is, user1 working on app1.py and user2 working on app2.py uses same id for object, like say dbc.Checklist. In such scenarios, while loading the home page I am getting the error
Duplicate callback outputs
In the callback for output(s):
Output 0 (chkLstState.value) is already in use.
Any given output can only have one callback that sets it.
To resolve this situation, try combining these into
one callback function, distinguishing the trigger
by using dash.callback_context if necessary.
Can someone point to an example how we can handle such a requirement? Thanks.