Skip to content

Commit db39fa7

Browse files
author
webersa
committed
add documentation for plotly_header and plotly_footer
1 parent feabacb commit db39fa7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/template_tags.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,40 @@ This tag should not appear more than once on a page. This rule however is not en
7070

7171
.. _plotly_message_pipe:
7272

73+
74+
The ``plotly_header`` and ``plotly_footer`` template tag
75+
--------------------------------------------------------
76+
77+
``DjangoDash`` allows you to inject directly the html generate by ``Dash`` in
78+
the DOM of the page (without iframe). To include your app CSS and JS, use the
79+
``plotly_header`` and ``plotly_footer`` tag in your template, as folllows:
80+
81+
.. code-block:: jinja
82+
83+
<!-- templates/base.html -->
84+
<!DOCTYPE html>
85+
<html>
86+
<head>
87+
...
88+
{% load plotly_dash%}
89+
...
90+
{% plotly_header %}
91+
92+
...
93+
</head>
94+
<body>
95+
...
96+
{%plotly_direct name="SimpleExample"%}
97+
...
98+
</body>
99+
...
100+
{% plotly_footer %}
101+
</html>
102+
103+
This part in mandatory if you want to use ``plotly_direct`` tag.
104+
105+
106+
73107
The ``plotly_message_pipe`` template tag
74108
----------------------------------------
75109

0 commit comments

Comments
 (0)