Skip to content

Commit c290b43

Browse files
author
Mark Gibbs
committed
First cut, with css classes based on app name
1 parent 01c25e4 commit c290b43

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

django_plotly_dash/dash_wrapper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
'''dash_wrapper
1+
'''
2+
dash_wrapper
23
34
This module provides a DjangoDash class that can be used to
45
expose a Plotly Dasb application through a Django server
@@ -420,4 +421,7 @@ def extra_html_properties(self):
420421
The content returned from this function is injected unescaped into templates.
421422
'''
422423

423-
return 'class="django-plotly-dash django-plotly-dash-iframe"'
424+
pre_slugified_id = self._uid
425+
slugified_id = slugify(pre_slugified_id)
426+
427+
return 'class="django-plotly-dash django-plotly-dash-iframe django-plotly-dash-app-%s"' % slugified_id

0 commit comments

Comments
 (0)