Skip to content

Commit 9f1e385

Browse files
author
Mark Gibbs
committed
Expand range of valid input for template tag
1 parent d17f822 commit 9f1e385

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

django_plotly_dash/templatetags/plotly_dash.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from django_plotly_dash.dash_wrapper import get_stateless_by_name
88

99
@register.inclusion_tag("django_plotly_dash/plotly_item.html", takes_context=True)
10-
def plotly_app(context, name=None, slug=None, ratio=0.1, use_frameborder=False):
10+
def plotly_app(context, name=None, slug=None, da=None, ratio=0.1, use_frameborder=False):
1111

1212
fbs = use_frameborder and '1' or '0'
1313

@@ -28,11 +28,10 @@ def plotly_app(context, name=None, slug=None, ratio=0.1, use_frameborder=False):
2828

2929
if name is not None:
3030
da = get_stateless_by_name(name)
31-
app = da.form_dash_instance()
3231

3332
if slug is not None:
3433
da = get_object_or_404(DashApp,slug=slug)
35-
app = da.as_dash_instance()
3634

35+
app = da.form_dash_instance()
3736
return locals()
3837

0 commit comments

Comments
 (0)