From 4bf7a487910abd0487983e85722d134aa9bb95fe Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 6 Dec 2024 14:47:56 +0100 Subject: [PATCH] progress rounding --- src/annoy/models.py | 4 ++++ src/annoy/templates/annoy/banner_crisis.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/annoy/models.py b/src/annoy/models.py index f6dd827d1..0d887920d 100644 --- a/src/annoy/models.py +++ b/src/annoy/models.py @@ -85,6 +85,10 @@ class Banner(models.Model): return 0 return (self.progress or 0) / self.target * 100 + @property + def progress_percent_pretty(self): + return int(self.progress_percent) + def update_progress(self): # Total of new payments during the action. # This definition will need to change for longer timespans. diff --git a/src/annoy/templates/annoy/banner_crisis.html b/src/annoy/templates/annoy/banner_crisis.html index dbbb34e7a..1398ee573 100644 --- a/src/annoy/templates/annoy/banner_crisis.html +++ b/src/annoy/templates/annoy/banner_crisis.html @@ -35,7 +35,7 @@
- +
-- 2.20.1