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-bootstrap4and addbootstrap4to INSTALLED_APPS in the project’ssettings.pyfile - make sure that the settings for serving static files are set correctly, particularly STATIC_ROOT, as described in the Django documentation
- use the
prepare_demoscript or perform the equivalent steps, paricularly themigrateandcollectstaticsteps - make sure
add_bootstrap_links=Trueis set for apps usingdash-bootstrap-components - the Django documentation deployment section covers setting up the serving of static files for production