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