Skip to content

Commit c09ae42

Browse files
author
Mark Gibbs
committed
Refactored demo pages
1 parent c03c732 commit c09ae42

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

demo/demo/templates/demo_one.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
{%load plotly_dash%}
5+
<title>Simple stuff</title>
6+
</head>
7+
<body>
8+
<div>
9+
<p>Navigational links :
10+
<a href="{%url "home"%}">Main Page</a>
11+
</p>
12+
</div>
13+
<div>
14+
Content here
15+
{%plotly_app slug="simpleexample-1" ratio=0.2 %}
16+
</div>
17+
<div>
18+
Content here
19+
{%plotly_app name="SimpleExample"%}
20+
</div>
21+
<div>
22+
Content here
23+
{%plotly_app name="Ex2"%}
24+
</div>
25+
<div>
26+
WS Content here
27+
{%plotly_app name="Connected"%}
28+
</div>
29+
<div>
30+
WS Content here
31+
{%plotly_app slug="connected-2"%}
32+
</div>
33+
</body>
34+
{%plotly_message_pipe%}
35+
</html>

demo/demo/templates/second_page.html renamed to demo/demo/templates/demo_two.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<div>
99
<p>Navigational links :
1010
<a href="{%url "home"%}">Main Page</a>
11-
<a href="{%url "second"%}">Second Page</a>
1211
</p>
1312
</div>
1413
<div>

demo/demo/templates/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<div>
99
<p>Navigational links :
1010
<a href="{%url "home"%}">Main Page</a>
11-
<a href="{%url "second"%}">Second Page</a>
11+
<a href="{%url "demo-one"%}">Demo One</a>
12+
<a href="{%url "demo-two"%}">Demo Two</a>
1213
</p>
1314
</div>
1415
<div>

demo/demo/urls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
1515
"""
1616
from django.contrib import admin
17-
from django.urls import include, path
17+
from django.urls import include
1818
from django.conf.urls import url
1919

2020
from django.views.generic import TemplateView
@@ -24,7 +24,8 @@
2424

2525
urlpatterns = [
2626
url('^$', TemplateView.as_view(template_name='index.html'), name="home"),
27-
url('^second_page$', TemplateView.as_view(template_name='second_page.html'), name="second"),
27+
url('^demo-one$', TemplateView.as_view(template_name='demo_one.html'), name="demo-one"),
28+
url('^demo-two$', TemplateView.as_view(template_name='demo_two.html'), name="demo-two"),
2829
url('^admin/', admin.site.urls),
2930
url('^django_plotly_dash/', include('django_plotly_dash.urls')),
3031
]

0 commit comments

Comments
 (0)