Skip to content

Commit

Permalink
Merge pull request #54 from weber-s/doc_tag_plotly
Browse files Browse the repository at this point in the history
[DOC] Add plotly_header and plotly_footer in doc

Addresses #49
  • Loading branch information
GibbsConsulting committed Oct 19, 2018
2 parents feabacb + 31d5efb commit 9681f22
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/template_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ This tag should not appear more than once on a page. This rule however is not en

.. _plotly_message_pipe:


The ``plotly_header`` and ``plotly_footer`` template tag
--------------------------------------------------------

``DjangoDash`` allows you to inject directly the html generated by ``Dash`` in
the DOM of the page (without iframe). To include your app CSS and JS, you have
to include 2 tags in your template ``plotly_header`` and ``plotly_footer``, as
folllows:

.. code-block:: jinja
<!-- templates/base.html -->
<!DOCTYPE html>
<html>
<head>
...
{% load plotly_dash%}
...
{% plotly_header %}
...
</head>
<body>
...
{%plotly_direct name="SimpleExample"%}
...
</body>
...
{% plotly_footer %}
</html>
This part in mandatory if you want to use ``plotly_direct`` tag.



The ``plotly_message_pipe`` template tag
----------------------------------------

Expand Down

0 comments on commit 9681f22

Please sign in to comment.