Skip to content

Commit 0ba1554

Browse files
author
delsim
committed
Update dpd to work with dash versions > 3
1 parent f65e613 commit 0ba1554

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

django_plotly_dash/dash_wrapper.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ def __init__(self,
430430

431431
kwargs['url_base_pathname'] = self._base_pathname
432432
kwargs['server'] = self._notflask
433+
#kwargs['use_async'] = False
433434

434435
#xkwargs['DEBUG'] = kwargs.get('DEBUG', False)
435436

@@ -819,3 +820,12 @@ def set_embedded(self, embedded_holder=None):
819820
def exit_embedded(self):
820821
'Exit the embedded section after processing a view'
821822
self._return_embedded = False
823+
824+
def __call__(self, *args, **kwargs):
825+
"""Implement a no-op __call__ method.
826+
827+
This is needed as dash v3.1.0 adds a __call__ method to the underlying Dash
828+
class, and this interferes with the operation of Django templates.
829+
"""
830+
return self
831+

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dash>=2.0,<3.0
1+
dash>=3.0
22
plotly
33
dpd-components
44

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'Documentation': 'http://django-plotly-dash.readthedocs.io/',
4242
},
4343
install_requires = ['plotly',
44-
'dash>=2.0,<3.0',
44+
'dash>=3.0',
4545
'dpd-components',
4646

4747
'dash-bootstrap-components',

0 commit comments

Comments
 (0)