Skip to content

Commit 1715385

Browse files
author
Mark Gibbs
committed
Added demo five for explicit embedding
1 parent 28ce1c4 commit 1715385

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

demo/demo/templates/base.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
</a>
2323
{%block demo_items%}
2424
<a class="nav-item nav-link btn btn-lg" href="{%url "home"%}">Contents</a>
25-
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-one"%}">Demo One - Simple Use</a>
26-
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-two"%}">Demo Two - Initial State</a>
27-
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-three"%}">Demo Three - Enhanced Callbacks</a>
28-
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-four"%}">Demo Four - Live Updating</a>
25+
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-one"%}">One - Simple Use</a>
26+
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-two"%}">Two - Initial State</a>
27+
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-three"%}">Three - Enhanced Callbacks</a>
28+
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-four"%}">Four - Live Updating</a>
29+
<a class="nav-item nav-link btn btn-lg" href="{%url "demo-five"%}">Five - Direct Embedding</a>
2930
<a class="nav-item nav-link btn btn-lg"
3031
target="_blank"
3132
href="https://django-plotly-dash.readthedocs.io/en/latest/">Online Documentation</a>

demo/demo/templates/demo_five.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
{%block title%}Demo One - Simple Embedding{%endblock%}
55

66
{%block content%}
7-
<h1>Simple App Embedding</h1>
7+
<h1>Direct App Embedding</h1>
88
<p>
99
This is a simple example of use of a dash application within a Django template. Use of
10-
the plotly_app template tag with the name of a dash application represents the simplest use of
11-
the django_plotly_dash framework.
10+
the plotly_direct template tag with the name of a dash application causes
11+
the Dash application to be directly embedded within the page.
1212
</p>
1313
<p>
1414
The plotly_class tag is also used to wrap the application in css class names based on the
@@ -18,15 +18,15 @@ <h1>Simple App Embedding</h1>
1818
<div class="card bg-light border-dark">
1919
<div class="card-body">
2020
<p><span>{</span>% load plotly_dash %}</p>
21-
<p>&lt;div class="<span>{</span>% plotly_class name="SimpleExample"%}">
21+
<p>&lt;div class="<span>{</span>% plotly_class name="SimpleExample" template_type="div-direct"%}">
2222
<p class="ml-3"><span>{</span>% plotly_direct name="SimpleExample" %}</p>
2323
<p>&lt;\div>
2424
</div>
2525
</div>
2626
<p></p>
2727
<div class="card border-dark">
2828
<div class="card-body">
29-
<div class="{%plotly_class name="SimpleExample"%}">
29+
<div class="{%plotly_class name="SimpleExample" template_type="div-direct"%}">
3030
{%plotly_direct name="SimpleExample"%}
3131
</div>
3232
</div>

0 commit comments

Comments
 (0)