From bff17dd2a0a92eed88606c6bdac2e555d25e1ce5 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Wed, 29 May 2019 09:47:21 -0700 Subject: [PATCH] Support two output formats from plotly.plot. --- reports/templates/reports/report_base.html | 3 +-- reports/utils.py | 13 +++++++++---- reports/views.py | 16 ++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/reports/templates/reports/report_base.html b/reports/templates/reports/report_base.html index 8f584516..b31f62b8 100644 --- a/reports/templates/reports/report_base.html +++ b/reports/templates/reports/report_base.html @@ -25,6 +25,5 @@ {% block javascript %} - {{ js_graph|safe }} - {{ js_listener|safe }} + {{ js|safe }} {% endblock %} \ No newline at end of file diff --git a/reports/utils.py b/reports/utils.py index 44ac2136..18f8c60c 100644 --- a/reports/utils.py +++ b/reports/utils.py @@ -79,10 +79,15 @@ def rangeselector_date(): def split_graph_output(output): """ Split out of a Plotly graph in to html and javascript. + This function accounts for two output formats from different Plotly + versions: one with a single