diff --git a/django_wtf/core/viewz/detail_view.py b/django_wtf/core/viewz/detail_view.py index 0d3d9bd..d4bf59d 100644 --- a/django_wtf/core/viewz/detail_view.py +++ b/django_wtf/core/viewz/detail_view.py @@ -14,7 +14,7 @@ def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) obj = self.get_object() stars_since_1m = obj.stars_since(td=timedelta(days=30)) - context["stars_increase_monthly_percent"] = stars_since_1m / obj.stars * 1.0 + context["stars_increase_monthly_percent"] = stars_since_1m / obj.stars * 100.0 return context diff --git a/django_wtf/templates/core/repository_detail.html b/django_wtf/templates/core/repository_detail.html index 455d6e7..8689a07 100644 --- a/django_wtf/templates/core/repository_detail.html +++ b/django_wtf/templates/core/repository_detail.html @@ -30,7 +30,7 @@

{{ object.description }}

Stars
{{ object.stars }}
-
{{ stars_increase_monthly_percent }}% more than last month
+
{{ stars_increase_monthly_percent | floatformat:2 }}% more than last month