Merge branch 'master' of github.com:bornhack/bornhack-website

This commit is contained in:
Thomas Steen Rasmussen 2017-03-26 15:05:39 +02:00
commit 489cc2f55f
4 changed files with 14 additions and 3 deletions

View file

@ -62,7 +62,8 @@
<td>
<strong>Total</strong>
<td>
{{ order.total|currency }}
{{ order.total|currency }}<br />
(~{{ order.total|approxeur }})
</table>

View file

@ -20,7 +20,8 @@
<h3>
<small>Price</small><br />
{{ product.price|currency }}
{{ product.price|currency }}<br />
~{{ product.price|approxeur }}
</h3>
<hr />

View file

@ -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>

View file

@ -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: