Dash, css file not included in render

I am attempting to move from plotly to dash, and am beginning with a simple row and col organization of divs. The app renders fine with my file structure; app.py and index.py in the main folder, and an additional style.css file in the /assets folder.

However, when I add some styling to the css, the main dash app does not “automatically render it” as the documentation states it should.

  1. my dash version is later than 2.13; specific verison is 2.18.1
  2. I have tried both including and excluding “name” in the Dash() call
  3. I have tried specifically stating assets_external_path=“/assets”

And it still does not connect to the style.css folder.

Does anyone have any tips or tricks to get plotly to recognize the stylesheet?

Hello!

Here are some debugging questions:

  1. Are you developing locally with app.run_server(debug=True) ? It is required to have hot reloading of CSS files.
  2. Can you check in the developer tools if the .css file is loaded or not (in the network tab) ?
2 Likes

ah, it was on debug=True. Fixed, thank you!