diff --git a/README.md b/README.md index 47fa51c471f5e15601df345fb530e53fdd64ef26..711c13babe48d4f6285047e7605190beed3f6d0b 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 0d7d52f2ace0384b1528d29157fee0454a9386d1..9b460b4113ab72dca78425f07f1cc336d9527045 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 0000000000000000000000000000000000000000..68585f4409a76b52360c10406b605892ed64d208 --- /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 cb77a7de572a242001548a3b314e07dfd81ffe58..ed879c1d4bc430d89401faa12308d68c0598603d 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 5be492e0253675e3de0d2616d143b5c82cd0fa5b..e20d623bcef3bd67abe6af69aeb000f37862a110 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 --------------------