Skip to content

Commit 852e01a

Browse files
author
Mark Gibbs
committed
Brief documentation on the template tag
1 parent 2c9ee6d commit 852e01a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/template_tags.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@
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.
8+
9+
:name = None: The name of the application, as passed to a ``DjangoDash`` constructor.
10+
:slug = None: The slug of the application instance.
11+
:da = None: An existing ``django_plotly_dash.models.DashApp`` model instance.
12+
:ratio = 0.1: The ratio of height to width. The container will inherit its width as 100% of its parent, and then rely on
13+
this ratio to set its height.
14+
:use_frameborder = "0": HTML element property of the iframe containing the application.
15+
16+
At least one of ``da``, ``slug`` and ``name`` must be provided. An object identified by ``slug`` will always be used, otherwise any
17+
identified by ``name`` will be. If either of these arguments are provided, they must resolve to valid objects even if
18+
not used. If neither are provided, then the model instance in ``da`` will be used.
19+

0 commit comments

Comments
 (0)