is there any way to specify assets folder path to server locally?
You can use the
app = dash.Dash(__name__, assets_folder='files/assets').
can you give a example at a glance?
Example, my directory tree as below:
. component 1
getallia.py is main file, I run project by
python gentallia.py. In dashapp.py, I init a dash object by
dash_app = Dash(__name__, server = app, assets_folder = 'assets'). But it seems not to be run, what should I do? Thank you
Network snipped as
My problem is that, if I locate flask_app modul and dash_app modul in the same directory, it works. But when I put them in different folder, it doesnot work
Have you tried setting the assets_folder to the relative path from you main file?
If you run genitallia.py, what happens if you set the path to App/component1/subcomponent1/assets (based on the tree you mentionned)
I tried, but it notice that the local version is not found. Then, I add manually by using init
app = Dash(__name__, external_stylesheets=external_stylesheets, external_scripts=external_scripts)
It got those css and js files I pass to
But I didnot work.
The network and console as bellow figure:
I dont know why because if I create an app.py same directory with the dashapp, it work. But when I used in my project, it didnot work