diff --git a/uhepp_org/uhepp_vault/templates/uhepp_vault/home.html b/uhepp_org/uhepp_vault/templates/uhepp_vault/home.html index 486b69c57725524b228912e90b0e1cfc9452d2f3..4a164410d8fbccbe3e0240d995be46e2740ab0f2 100644 --- a/uhepp_org/uhepp_vault/templates/uhepp_vault/home.html +++ b/uhepp_org/uhepp_vault/templates/uhepp_vault/home.html @@ -5,7 +5,13 @@ <div class="jumbotron jumbo-fluid plot-background shadow"> <div class="container"> <h1 class="display-4">uhepp hub</h1> - <h2>Home of over {{ plot_count }} plots</h2> + <h2> + {% if plot_count < 10 %} + Home of plots + {% else %} + Home of over {{ plot_count }} plots + {% endif %} + </h2> </div> </div> {% endblock %} diff --git a/uhepp_org/uhepp_vault/views.py b/uhepp_org/uhepp_vault/views.py index 61ac321cc05f057a81ebf98245356164c9cec6cd..529894c1ed8a2f4afd2556228fa5825ce8892379 100644 --- a/uhepp_org/uhepp_vault/views.py +++ b/uhepp_org/uhepp_vault/views.py @@ -22,6 +22,9 @@ from .models import PUBLIC_LEVEL, INTERNAL_LEVEL, PUBLIC_LEVEL, \ from .forms import TokenForm def quantize(value, sig_digits): + if value <= 100: + return value + magnitude = math.floor(math.log10(value)) scale = magnitude - sig_digits + 1 return math.floor(value / 10**scale) * 10**scale