DataIku webapp css file or static file
The DataIku dash webapp has been implemented with the "app.run_server()"
So in the main python code, just create the layout, register callback, etc. No need to the run_server.
The default "assets" folder is not available, so it needs another place to store static files like css file.
Go to the project level "Libraries" from the dropdown menu.
This is where you can create local lib folders, resource folders, and integrate with GitHub repos.
Under the "Libraries" and "Resources" taps, a default "lib" directory.
create a "static" folder directly under the "lib" folder.
The files within the static folder will become project private files.
Only people have access to the project has access to the files.
For example, if you have styles.css file under the static folder, the css file's path is:
https://your_dataiku_url/local/projects/YOUR_PROJECT_NAME/static/styles.css
or
https://your_dataiku_url/local/projects/YOUR_PROJECT_NAME/resources/styles.css
depending on you are using the Libraries or Resources tap.
Then in the main python code for the dashapp, simply reference to the css file using external stylesheets.
import dash_html_components as html
from your_library import layout
css_path = "https://your_dataiku_url/local/projects/YOUR_PROJECT_NAME/static/styles.css"
app.config.external_stylesheets = [css_path]
app.layout = layout.create_layout()
Pubic static files
If create a "local-static" folder under the Resources tab, then the files under it become public static files.
No access is required.
"https://your_dataiku_url/local/projects/YOUR_PROJECT_NAME/public-resources/styles.css"