Skip to content

Commit f751a6c

Browse files
author
Mark Gibbs
committed
Documentation of plotly_direct template tag
1 parent ed83aa7 commit f751a6c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/template_tags.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,32 @@ a JSON-encoded string representation. Each entry in the dictionary has the ``id`
4242
value is a dictionary mapping property
4343
name keys to initial values.
4444

45+
.. _plotly_direct:
46+
47+
The ``plotly_direct`` template tag
48+
----------------------------------
49+
50+
This template tag allows the direct insertion of html into a template, instead
51+
of embedding it in an iframe.
52+
53+
.. code-block:: jinja
54+
55+
{%load plotly_dash%}
56+
57+
{%plotly_direct name="SimpleExample"%}
58+
59+
The tag arguments are:
60+
61+
:name = None: The name of the application, as passed to a ``DjangoDash`` constructor.
62+
:slug = None: The slug of an existing ``DashApp`` instance.
63+
:da = None: An existing ``django_plotly_dash.models.DashApp`` model instance.
64+
65+
These arguments are equivalent to the same ones for the ``plotly_app`` template tag. Note
66+
that ``initial_arguments`` are not currently supported, and as the app is directly injected into
67+
the page there are no arguments to control the size of the iframe.
68+
69+
This tag should not appear more than once on a page. This rule however is not enforced at present.
70+
4571
.. _plotly_message_pipe:
4672

4773
The ``plotly_message_pipe`` template tag

0 commit comments

Comments
 (0)