From d4ef85c7345907e3a1f7ea810716eabbdb3e15c1 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Guhur Date: Wed, 29 Apr 2020 07:58:52 +0000 Subject: [PATCH] add review from D. --- dashboard/utils.py | 2 +- docker/Dockerfile_dash | 3 +-- docker/dash.sh | 1 - requirements.txt | 3 +++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dashboard/utils.py b/dashboard/utils.py index 24bead0..caf5903 100644 --- a/dashboard/utils.py +++ b/dashboard/utils.py @@ -154,7 +154,7 @@ def build_most_voted_tables(top=10): titles = [election["election__title"] for election in votes_qs] num_votes = [election["count"] for election in votes_qs] return dcc.Graph( - go.Figure( + figure=go.Figure( data=[go.Table( header=dict(values=["Title", "Number of votes"]), cells=dict(values=[titles, num_votes]), diff --git a/docker/Dockerfile_dash b/docker/Dockerfile_dash index fe9f757..ae1e77b 100644 --- a/docker/Dockerfile_dash +++ b/docker/Dockerfile_dash @@ -4,5 +4,4 @@ RUN mkdir /code WORKDIR /code COPY requirements.txt /code/ RUN pip install -U pip \ - && pip install -r requirements.txt \ - && pip install dash + && pip install -r requirements.txt diff --git a/docker/dash.sh b/docker/dash.sh index 81c50f6..ce69c00 100755 --- a/docker/dash.sh +++ b/docker/dash.sh @@ -1,4 +1,3 @@ -pip install dash dash_daq dash-bootstrap-components pushd dashboard python dash_app.py popd diff --git a/requirements.txt b/requirements.txt index fd4eaa0..3336eee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,6 @@ django-cors-headers==3.2.1 djangorestframework==3.11.0 nose==1.3.7 psycopg2==2.8.4 +dash==1.11.0 +dash_daq==0.5.0 +dash-bootstrap-components==0.9.2