From: Radek Czajka Date: Fri, 6 Dec 2024 13:47:56 +0000 (+0100) Subject: progress rounding X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/4bf7a487910abd0487983e85722d134aa9bb95fe?ds=inline progress rounding --- 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 @@
- +