Skip to content

Commit

Permalink
Documentation of plotly_direct template tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Gibbs committed Aug 30, 2018
1 parent ed83aa7 commit f751a6c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/template_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,32 @@ a JSON-encoded string representation. Each entry in the dictionary has the ``id`
value is a dictionary mapping property
name keys to initial values.

.. _plotly_direct:

The ``plotly_direct`` template tag
----------------------------------

This template tag allows the direct insertion of html into a template, instead
of embedding it in an iframe.

.. code-block:: jinja
{%load plotly_dash%}
{%plotly_direct name="SimpleExample"%}
The tag arguments are:

:name = None: The name of the application, as passed to a ``DjangoDash`` constructor.
:slug = None: The slug of an existing ``DashApp`` instance.
:da = None: An existing ``django_plotly_dash.models.DashApp`` model instance.

These arguments are equivalent to the same ones for the ``plotly_app`` template tag. Note
that ``initial_arguments`` are not currently supported, and as the app is directly injected into
the page there are no arguments to control the size of the iframe.

This tag should not appear more than once on a page. This rule however is not enforced at present.

.. _plotly_message_pipe:

The ``plotly_message_pipe`` template tag
Expand Down

0 comments on commit f751a6c

Please sign in to comment.