Using Bootstrap¶
The django-plotly-dash
package is frequently used with the dash-bootstrap-components
package, and this
requires a number of steps to set up correctly.
This section is a checkist of the required confiuration steps.
- install the package as descrbed in the installation section
- install the static support package with
pip install dpd-static-support
- add the various settings in the configuration section, particularly the STATICFILES_FINDERS, PLOTLY_COMPONENTS and MIDDLEWARE ones.
- install django-bootstrap 4 with
pip install django-bootstrap4
and addbootstrap4
to INSTALLED_APPS in the project’ssettings.py
file - make sure that the settings for serving static files are set correctly, particularly STATIC_ROOT, as described in the Django documentation
- use the
prepare_demo
script or perform the equivalent steps, paricularly themigrate
andcollectstatic
steps - make sure
add_bootstrap_links=True
is set for apps usingdash-bootstrap-components
- the Django documentation deployment section covers setting up the serving of static files for production