From 17a2a672965715b28d7862f13ed72550cee456b5 Mon Sep 17 00:00:00 2001
From: Mark Gibbs <delsim@users.noreply.github.com>
Date: Sat, 20 Jun 2020 22:11:53 -0700
Subject: [PATCH] Add checklist for bootstrap installation (#255)

* Add checklist for bootstrap installation

* Increment version to 1.4.1

Co-authored-by: Mark Gibbs <mark@gibbs.consulting>
---
 README.md                     | 10 +++++++---
 django_plotly_dash/version.py |  2 +-
 docs/bootstrap.rst            | 28 ++++++++++++++++++++++++++++
 docs/index.rst                |  1 +
 docs/installation.rst         |  3 +++
 5 files changed, 40 insertions(+), 4 deletions(-)
 create mode 100644 docs/bootstrap.rst

diff --git a/README.md b/README.md
index 47fa51c..711c13b 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ Then, add `django_plotly_dash` to `INSTALLED_APPS` in your Django `settings.py`
         ]
 
 The application's routes need to be registered within the routing structure by an appropriate ``include`` statement in
-a ``urls.py`` file::
+a ``urls.py`` file:
 
     urlpatterns = [
         ...
@@ -48,11 +48,15 @@ a ``urls.py`` file::
 The name within the URL is not important and can be changed.
 
 For the final installation step, a migration is needed to update the
-database::
+database:
 
     ./manage.py migrate
 
-Note that this package requires version 2.0 or greater of Django, due to the use of the `path` function for registering routes.
+If using version 3.0 or later of Django, then the use of frames within
+HTML documents has to be enabled by adding to the ``settings.py`` file:
+
+    X_FRAME_OPTIONS = 'SAMEORIGIN'
+
 
 Further configuration, including live updating to share application
 state, is described in the [online documentation](https://django-plotly-dash.readthedocs.io/en/latest/).
diff --git a/django_plotly_dash/version.py b/django_plotly_dash/version.py
index 0d7d52f..9b460b4 100644
--- a/django_plotly_dash/version.py
+++ b/django_plotly_dash/version.py
@@ -23,4 +23,4 @@ SOFTWARE.
 
 '''
 
-__version__ = "1.4.0"
+__version__ = "1.4.1"
diff --git a/docs/bootstrap.rst b/docs/bootstrap.rst
new file mode 100644
index 0000000..68585f4
--- /dev/null
+++ b/docs/bootstrap.rst
@@ -0,0 +1,28 @@
+.. _bootstrap:
+
+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 :ref:`installation <installation>` section
+
+- add the various settings in the :ref:`configuration <configuration>` section, particularly
+  the STATICFILES_FINDERS, PLOTLY_COMPONENTS and MIDDLEWARE ones.
+
+- install django-bootstrap 4 with ``pip install django-bootstrap4`` and add ``bootstrap4`` to INSTALLED_APPS in the
+  project's ``settings.py`` file
+
+- make sure that the settings for serving static files are set correctly, particularly STATIC_ROOT, as
+  described in the Django `documentation <https://docs.djangoproject.com/en/3.0/howto/static-files/>`_
+
+- use the ``prepare_demo`` script or perform the equivalent steps, paricularly the ``migrate`` and ``collectstatic`` steps
+
+- make sure ``add_bootstrap_links=True`` is set for apps using ``dash-bootstrap-components``
+
+- the Django documentation `deployment <https://docs.djangoproject.com/en/3.0/howto/static-files/deployment/>`_ section
+  covers setting up the serving of static files for production
diff --git a/docs/index.rst b/docs/index.rst
index cb77a7d..ed879c1 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -24,6 +24,7 @@ Contents
    dash_components
    configuration
    local_assets
+   bootstrap
    demo_notes
    access_control
    faq
diff --git a/docs/installation.rst b/docs/installation.rst
index 5be492e..e20d623 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -98,6 +98,9 @@ available options are detailed in the :ref:`configuration <configuration>` secti
 
 This includes arranging for Dash assets to be served using the Django ``staticfiles`` functionality.
 
+A checklist for using ``dash-bootstrap-components`` can be found
+in the :ref:`bootstrap <bootstrap>` section.
+
 Source code and demo
 --------------------
 
-- 
GitLab