Skip to content
Snippets Groups Projects
Unverified Commit 17a2a672 authored by Mark Gibbs's avatar Mark Gibbs Committed by GitHub
Browse files

Add checklist for bootstrap installation (#255)


* Add checklist for bootstrap installation

* Increment version to 1.4.1

Co-authored-by: default avatarMark Gibbs <mark@gibbs.consulting>
parent 6b2c3cd7
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ Then, add `django_plotly_dash` to `INSTALLED_APPS` in your Django `settings.py` ...@@ -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 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 = [ urlpatterns = [
... ...
...@@ -48,11 +48,15 @@ a ``urls.py`` file:: ...@@ -48,11 +48,15 @@ a ``urls.py`` file::
The name within the URL is not important and can be changed. The name within the URL is not important and can be changed.
For the final installation step, a migration is needed to update the For the final installation step, a migration is needed to update the
database:: database:
./manage.py migrate ./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 Further configuration, including live updating to share application
state, is described in the [online documentation](https://django-plotly-dash.readthedocs.io/en/latest/). state, is described in the [online documentation](https://django-plotly-dash.readthedocs.io/en/latest/).
......
...@@ -23,4 +23,4 @@ SOFTWARE. ...@@ -23,4 +23,4 @@ SOFTWARE.
''' '''
__version__ = "1.4.0" __version__ = "1.4.1"
.. _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
...@@ -24,6 +24,7 @@ Contents ...@@ -24,6 +24,7 @@ Contents
dash_components dash_components
configuration configuration
local_assets local_assets
bootstrap
demo_notes demo_notes
access_control access_control
faq faq
......
...@@ -98,6 +98,9 @@ available options are detailed in the :ref:`configuration <configuration>` secti ...@@ -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. 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 Source code and demo
-------------------- --------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment