I created a Dash application which is running fine on it's own (with no import issues). Other users also created application that we now want to merge into a single application with a general index linking every application. I can't find a solution to load a package I created. I want to run the application on it's own (debugging purpose) and via the general index (production purpose).
Here is the structure for my app (similar to what is detailed here on the Dash documentation):
+ app.py --> creates the dash server
+ layout.py --> Defines my page layout
+ callbacks.py --> I imported packages here (import package as pk) that will fail when run via the general index
+ package --> the packages I created
After I merged the project, my structure looks like that (via a git submodule add):
+ app.py
+ index.py --> will call the layouts
+ initial app folder (git submodule from structure above)
+ __init__.py
+ the files above
When I start the server, I get the error message pk.something error, pk is not defined. I can't find a solution to have the application run standalone and within the general index. I tried to move the import (in app.py or in the new __init__.py) but nothing works.
My next attempt will be to move the package in a new subfolder. Does anyone know if that will work ?