Skip to content

Commit aa05e89

Browse files
author
Mark Gibbs
committed
Add css for demo
1 parent 5618359 commit aa05e89

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

demo/demo/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
STATIC_ROOT = os.path.join(BASE_DIR,'static')
127127

128128
STATICFILES_DIRS = [
129+
os.path.join(BASE_DIR,'demo','static'),
129130
]
130131

131132
# In order to serve dash components locally - not recommended in general, but

demo/demo/static/demo/demo.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* Extra CSS markup for demo pages */
2+

demo/demo/templates/base.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!DOCTYPE HTML>
22
<html>
33
<head>
4-
{%load plotly_dash%}
4+
{%load plotly_dash%}
5+
{%load staticfiles%}
6+
<link rel="stylesheet" type="text/css" href="{%static "demo/demo.css"%}"></link>
57
<title>Django Plotly Dash Examples - {%block title%}{%endblock%}</title>
68
</head>
79
<body>

demo/demo/templates/demo_one.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{%extends "base.html"%}
22
{%load plotly_dash%}
3-
{%block title%}Demo One{%endblock%}
3+
{%block title%}Demo One - Simple Embedding{%endblock%}
44
{%block post_body%}{%plotly_message_pipe%}{%endblock%}
55
{%block content%}
6+
<h1>Simple App Embedding</h1>
7+
<div>
8+
This page demonstrates the simple embedding of plotly dash apps within a Django template.
9+
</div>
610
<div>
7-
Content here
811
{%plotly_app slug="simpleexample-1" ratio=0.2 %}
912
</div>
1013
<div>
11-
Content here
1214
{%plotly_app name="SimpleExample"%}
1315
</div>
1416
<div>

0 commit comments

Comments
 (0)