Skip to content

Commit 2e81c52

Browse files
author
Mark Gibbs
committed
Add example use of template tag
1 parent 852e01a commit 2e81c52

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/template_tags.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
Template tags
44
=============
55

6-
The ``plotly_dash`` library provides the ``plotly_app`` template tag. This tag inserts
7-
a ``Dash`` app within a page as a responsive ``iframe`` element.
6+
Importing the ``plotly_dash`` library provides the ``plotly_app`` template tag::
7+
8+
{%load plotly_dash%}
9+
10+
{%plotly_item name="SimpleExample"%}
11+
12+
This tag inserts
13+
a ``DjangoDash`` app within a page as a responsive ``iframe`` element.
14+
15+
The tag arguments are:
816

917
:name = None: The name of the application, as passed to a ``DjangoDash`` constructor.
1018
:slug = None: The slug of the application instance.
@@ -13,7 +21,7 @@ a ``Dash`` app within a page as a responsive ``iframe`` element.
1321
this ratio to set its height.
1422
:use_frameborder = "0": HTML element property of the iframe containing the application.
1523

16-
At least one of ``da``, ``slug`` and ``name`` must be provided. An object identified by ``slug`` will always be used, otherwise any
24+
At least one of ``da``, ``slug`` or ``name`` must be provided. An object identified by ``slug`` will always be used, otherwise any
1725
identified by ``name`` will be. If either of these arguments are provided, they must resolve to valid objects even if
1826
not used. If neither are provided, then the model instance in ``da`` will be used.
1927

0 commit comments

Comments
 (0)