add rough euro prices to the shop. fix #32
This commit is contained in:
parent
850de5554f
commit
079ea6b2b8
|
@ -62,7 +62,8 @@
|
|||
<td>
|
||||
<strong>Total</strong>
|
||||
<td>
|
||||
{{ order.total|currency }}
|
||||
{{ order.total|currency }}<br />
|
||||
(~{{ order.total|approxeur }})
|
||||
|
||||
</table>
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
<h3>
|
||||
<small>Price</small><br />
|
||||
{{ product.price|currency }}
|
||||
{{ product.price|currency }}<br />
|
||||
~{{ product.price|approxeur }}
|
||||
</h3>
|
||||
|
||||
<hr />
|
||||
|
|
|
@ -57,7 +57,7 @@ Shop | {{ block.super }}
|
|||
</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ product.price|currency }}
|
||||
{{ product.price|currency }} (~{{ product.price|approxeur }})
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue