Skip to content

Commit 5677c95

Browse files
Merge pull request #42 from eddy-ojb/suppress_callback_exceptions
Suppress callback exceptions, addresses #36
2 parents 5f65e3c + e874652 commit 5677c95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

django_plotly_dash/dash_wrapper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class DjangoDash:
7878
def __init__(self, name=None, serve_locally=False,
7979
expanded_callbacks=False,
8080
add_bootstrap_links=False,
81+
suppress_callback_exceptions=False,
8182
**kwargs): # pylint: disable=unused-argument
8283
if name is None:
8384
global uid_counter # pylint: disable=global-statement
@@ -96,6 +97,7 @@ def __init__(self, name=None, serve_locally=False,
9697

9798
self._expanded_callbacks = expanded_callbacks
9899
self._serve_locally = serve_locally
100+
self._suppress_callback_exceptions = suppress_callback_exceptions
99101

100102
if add_bootstrap_links:
101103
from bootstrap4.bootstrap import css_url
@@ -157,6 +159,7 @@ def form_dash_instance(self, replacements=None, ndid=None, base_pathname=None):
157159
serve_locally=self._serve_locally)
158160

159161
rd.layout = self.layout
162+
rd.config['suppress_callback_exceptions'] = self._suppress_callback_exceptions
160163

161164
for cb, func in self._callback_sets:
162165
rd.callback(**cb)(func)

0 commit comments

Comments
 (0)