From 73f83de40b6477cffa4bc241078fea399c13740e Mon Sep 17 00:00:00 2001 From: Mark Gibbs Date: Thu, 19 Jul 2018 14:48:13 -0700 Subject: [PATCH] Handle missing PLOTLY_DASH settings gracefully --- django_plotly_dash/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/django_plotly_dash/util.py b/django_plotly_dash/util.py index 52d91d7b..99f14161 100644 --- a/django_plotly_dash/util.py +++ b/django_plotly_dash/util.py @@ -5,8 +5,10 @@ from django.conf import settings def _get_settings(): - pd_settings = settings.PLOTLY_DASH - return pd_settings if pd_settings else {} + try: + return settings.PLOTLY_DASH + except AttributeError: + return {} def pipe_ws_endpoint_name(): 'Return the endpoint for pipe websocket connections'