diff --git a/src/shop/templates/order_detail.html b/src/shop/templates/order_detail.html
index e1d90d72..72f2c925 100644
--- a/src/shop/templates/order_detail.html
+++ b/src/shop/templates/order_detail.html
@@ -62,7 +62,8 @@
Total
|
- {{ order.total|currency }}
+ {{ order.total|currency }}
+ (~{{ order.total|approxeur }})
diff --git a/src/shop/templates/product_detail.html b/src/shop/templates/product_detail.html
index 66429795..99301e27 100644
--- a/src/shop/templates/product_detail.html
+++ b/src/shop/templates/product_detail.html
@@ -20,7 +20,8 @@
Price
- {{ product.price|currency }}
+ {{ product.price|currency }}
+ ~{{ product.price|approxeur }}
diff --git a/src/shop/templates/shop_index.html b/src/shop/templates/shop_index.html
index 1a3fb9fa..9ee0e1f0 100644
--- a/src/shop/templates/shop_index.html
+++ b/src/shop/templates/shop_index.html
@@ -57,7 +57,7 @@ Shop | {{ block.super }}
|
- {{ product.price|currency }}
+ {{ product.price|currency }} (~{{ product.price|approxeur }})
|
diff --git a/src/shop/templatetags/shop_tags.py b/src/shop/templatetags/shop_tags.py
index 530445f5..7ca85fad 100644
--- a/src/shop/templatetags/shop_tags.py
+++ b/src/shop/templatetags/shop_tags.py
@@ -13,6 +13,15 @@ def currency(value):
return False
+@register.filter
+def approxeur(value):
+ print(type(value))
+ try:
+ return "{0:.2f} EUR".format(value / Decimal(7.5))
+ except ValueError:
+ return False
+
+
@register.filter()
def truefalseicon(value):
if value: