diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html
index 8e779576..60da04bf 100644
--- a/datacenterlight/templates/datacenterlight/landing_payment.html
+++ b/datacenterlight/templates/datacenterlight/landing_payment.html
@@ -1,5 +1,5 @@
{% extends "datacenterlight/base_hosting.html" %}
-{% load staticfiles bootstrap3 i18n %}
+{% load staticfiles bootstrap3 i18n humanize %}
{% block css_extra %}
@@ -78,7 +78,7 @@
{% trans "Configuration"%} {{request.session.template.name}}
- {%trans "Total" %} ({%trans "including VAT" %}) {{request.session.specs.price}} CHF/{% trans "Month" %}
+ {%trans "Total" %} ({%trans "including VAT" %}) {{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}
diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html
index 6b103970..78ed43c0 100644
--- a/datacenterlight/templates/datacenterlight/order_detail.html
+++ b/datacenterlight/templates/datacenterlight/order_detail.html
@@ -1,5 +1,5 @@
{% extends "datacenterlight/base_hosting.html" %}
-{% load staticfiles bootstrap3 i18n custom_tags %}
+{% load staticfiles bootstrap3 i18n custom_tags humanize %}
{% block content %}
@@ -59,15 +59,15 @@
{% trans "Memory" %}:
- {{vm.memory}} GB
+ {{vm.memory|intcomma}} GB
{% trans "Disk space" %}:
- {{vm.disk_size}} GB
+ {{vm.disk_size|intcomma}} GB
{% trans "Total" %}
- {{vm.price}} CHF
+ {{vm.price|intcomma}} CHF
diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py
index ae6f8132..5db5a498 100644
--- a/dynamicweb/settings/base.py
+++ b/dynamicweb/settings/base.py
@@ -82,6 +82,7 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
+ 'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
@@ -255,8 +256,6 @@ USE_L10N = True
USE_TZ = True
-USE_THOUSAND_SEPARATOR = True
-
FORMAT_MODULE_PATH = [
'dynamicweb.formats'
]
diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html
index f40ee34c..f5ee80b6 100644
--- a/hosting/templates/hosting/order_detail.html
+++ b/hosting/templates/hosting/order_detail.html
@@ -1,7 +1,6 @@
{% extends "hosting/base_short.html" %}
-{% load staticfiles bootstrap3 %}
-{% load i18n %}
-{% load custom_tags %}
+{% load staticfiles bootstrap3 humanize i18n custom_tags %}
+
{% block content %}
@@ -130,7 +129,7 @@
{% trans "Total" %}
- {{vm.price}} CHF
+ {{vm.price|intcomma}} CHF
@@ -143,7 +142,7 @@
{% csrf_token %}
-
{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.
+
{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price|intcomma }}CHF/month{% endblocktrans %}.
diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html
index e0e85cfd..f896c98b 100644
--- a/hosting/templates/hosting/orders.html
+++ b/hosting/templates/hosting/orders.html
@@ -1,6 +1,5 @@
{% extends "hosting/base_short.html" %}
-{% load staticfiles bootstrap3 %}
-{% load i18n l10n %}
+{% load staticfiles bootstrap3 humanize i18n %}
{% block content %}
@@ -30,7 +29,7 @@
{{ order.id }}
{{ order.created_at | date:"M d, Y H:i" }}
- {{ order.price }}
+ {{ order.price|intcomma }}
{% trans 'See Invoice' %}
diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html
index e9d6476f..4878831e 100644
--- a/hosting/templates/hosting/payment.html
+++ b/hosting/templates/hosting/payment.html
@@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %}
-{% load staticfiles bootstrap3 i18n %}
+{% load staticfiles bootstrap3 i18n humanize %}
{% block css_extra %}
@@ -34,7 +34,7 @@
{{request.session.specs.memory|floatformat}} GB
- {{request.session.specs.disk_size|floatformat}} GB
+ {{request.session.specs.disk_size|floatformat|intcomma}} GB
{{request.session.template.name}}
@@ -46,7 +46,7 @@
-
{{request.session.specs.price}}
+
{{request.session.specs.price|intcomma}}
CHF/{% trans "Month" %}
diff --git a/hosting/templates/hosting/virtual_machine_detail.html b/hosting/templates/hosting/virtual_machine_detail.html
index 0b882055..b77e1dca 100644
--- a/hosting/templates/hosting/virtual_machine_detail.html
+++ b/hosting/templates/hosting/virtual_machine_detail.html
@@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %}
-{% load staticfiles bootstrap3 %}
+{% load staticfiles bootstrap3 humanize %}
{% load i18n %}
{% block content %}
@@ -37,7 +37,7 @@
{% trans "Cores" %}: {{virtual_machine.cores}}
{% trans "Memory" %}: {{virtual_machine.memory}} GB
-
{% trans "Disk" %}: {{virtual_machine.disk_size|floatformat:2}} GB
+
{% trans "Disk" %}: {{virtual_machine.disk_size|floatformat:2|intcomma}} GB
{% trans "Configuration" %}: {{virtual_machine.configuration}}
@@ -45,7 +45,7 @@
{% trans "Billing" %}
{% trans "Current Pricing" %}
-
{{virtual_machine.price|floatformat}} CHF/{% trans "Month" %}
+
{{virtual_machine.price|floatformat|intcomma}} CHF/{% trans "Month" %}
{% trans "See Invoice" %}
diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html
index ce1656ae..467d9d39 100644
--- a/hosting/templates/hosting/virtual_machines.html
+++ b/hosting/templates/hosting/virtual_machines.html
@@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %}
-{% load staticfiles bootstrap3 i18n l10n %}
+{% load staticfiles bootstrap3 i18n %}
{% block content %}
@@ -40,7 +40,7 @@
{% for vm in vms %}
- {{vm.vm_id|unlocalize}}
+ {{vm.vm_id}}
{% if vm.ipv4 %}{{vm.ipv4}}{% endif %}
{% if vm.ipv6 %}{{vm.ipv6}}{% endif %}