I haven’t been this documented, so I thought it was worth to share with others.
If you, like I do, want to have your project structure with something similar to this:
│ ├── app.py
│ ├── assets
│ ├── init.py
│ └── main.py
and you run it through python
python -m myproject;
You will find that the assets/ folder is not served automatically by Dash as it is explained here. So in order to that folder (myproject/assets) to be served properly, you need to specify the assets_folder argument when you create the Dash instance. Something like this:
assets_folder = os.path.join(os.path.dirname(os.path.abspath(file)), ‘assets’);
app = app = dash.Dash(assets_folder=assets_folder)
However, you don’t need to use the
assets_url_path argument which, if I understood correctly, is meant to specify a different name of the folder inside the assets_folder.