From 163211ab0bac6dd92bc7cc35fae3b40ffc1e01d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 15 Jan 2023 13:02:02 +0100 Subject: [PATCH] Hide button if no last session --- Dockerfile | 2 +- pyproject.toml | 2 ++ src/web/tracker/templates/list_sessions.html | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa77520..903342a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN npm install && \ FROM python:3.10.9-alpine -ENV VERSION_NUMBER 0.2.1 +ENV VERSION_NUMBER 0.2.1-2-g734e6de ENV PROD 1 RUN apk add \ diff --git a/pyproject.toml b/pyproject.toml index 96a2dcc..06ec4ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,8 @@ python = "^3.10" django = "^4.1.4" gunicorn = "^20.1.0" uvicorn = "^0.20.0" +pandas = "^1.5.2" +matplotlib = "^3.6.3" [tool.poetry.group.dev.dependencies] black = "^22.12.0" diff --git a/src/web/tracker/templates/list_sessions.html b/src/web/tracker/templates/list_sessions.html index 2a140a1..7f389d8 100644 --- a/src/web/tracker/templates/list_sessions.html +++ b/src/web/tracker/templates/list_sessions.html @@ -4,11 +4,13 @@ {% block content %}
+ {% if dataset.count > 0 %} + {% endif %} {% if purchase %}

Listing sessions only for purchase "{{ purchase }}"

Total playtime: {{ total_duration }} over {{ dataset.count }} sessions.